Open anshu8858 opened 2 years ago
try this, works well for me:
https://github.com/osiemsiedem/intervention-image-vips-driver
Hello, I had a quick look at that driver and made an issue with a couple of things I spotted: https://github.com/osiemsiedem/intervention-image-vips-driver/issues/27
might be useful.
@jcupitt oh great, thanks
I would advise against the osiemsiedem
driver. The maintainer doesn't cooperate with intervention
devs & doesn't even reply to the other maintainers of the vips libs itself @jcupitt
. Thinks intervention is dead yet tries to have an adapter for the "dead" lib.
There have been talks of such adapters for 5 some years. Yet no progress on it. Seems like a lost cause. I'm just a junior php dev, please don't come at me with PRs lol.
Intervention & vips are both amazing projects. Would love to have them working together.
The osiemsiedem driver is MIT licenced, so it could be forked and maintained by intervention, if necessary. I'm not offering to do the work myself, of course ahem
The osiemsiedem driver is MIT licenced, so it could be forked and maintained by intervention, if necessary. I'm not offering to do the work myself, of course ahem
That is why I'm going to remove Intervention and directly use vips-php, not that difficult to use standalone.
That is why I'm going to remove Intervention and directly use vips-php, not that difficult to use standalone.
I agree. Intervention Image is basically just a layer of comfort and convenience. If one intend to use only VIPS (or any other processor) anyway, there is no reason not to the this processor directly.
https://github.com/osiemsiedem/intervention-image-vips-driver is outdated now - hasn't been updated for the v3 rewrite.
I'm interested in trying my hand at adding vips support natively to intervention/image - but that's obviously a massive undertaking and I'll need a fair amount of support and review to get going.
@olivervogel If I were to tackle this, what would be your preferred approach?
Would you be open to having a vips
branch, and I can target incremental PRs to that branch to slowly build up the feature?
Would you prefer I open a PR targetting the 'develop' branch, and have it in draft with incremental commits in that same PR?
Would you rather I not open a PR until the feature is 100% complete?
There is of course always the option of saying "intervention/image will not have native vips support" which is a valid stance to take since it will add a lot of additional code to maintain.
And before it's suggested: I'm not personally interested in making a third-party module which adds support.
I have often thought about integrating Vips as a third driver and love the idea to have such a tool.
This driver would however definitely create a new dependency with php-vips. For this reason I don't think it's a good idea to integrate it directly into intervention/image
. I want to prevent the Vips PHP Binding Composer Package jcupitt/vips
from being always automatically installed, even if the user does not intend to use Vips.
In my opinion, a better solution is to build the Vips driver as an official external package like intervention/image-driver-vips
for example. This could then be installed optionally and potentially unused dependencies could be avoided.
I already started with the implementation, but haven't made much progress yet. Everything is still in a very early stage and I would call it rather a case study to see how I can best integrate vips. There are no tests yet either.
I'm still not sure if all the features I've implemented for GD and Imagick will work with Vips. A first goal might be to implement at least the image resizing functions for a Vips driver and writing tests for the features implemented so far.
I put the current state into a public repository today, but it is not yet listed on Packagist. The driver is able to read (animated) images, do simple image resizing with resize()
and encode in Jpeg and GIF format.
If anyone is interested, the repository can be used as a base to continue working on it. Since this is a project independent of the main repository and the progress is still very early and WIP, any small changes and also larger features can be submitted as PR to the external vips driver repository (https://github.com/Intervention/image-driver-vips). I do not expect anything to be complete and fully functional yet.
The upcoming libvips 8.16 has a new chapter in the docs with a developer checklist:
https://github.com/libvips/libvips/blob/master/doc/Developer-checklist.md
It tries to give some general guidelines for designing things that use libvips. It might be helpful.
Please add
vips
for driver. It takes less RAM. Stack Overflow PECL