New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate vips, a quick thumbnailer that manages smart gravity for square thumbnails #1683
base: develop
Are you sure you want to change the base?
Conversation
33758e3
to
af4b812
Compare
I'll have to get a hold of vips so I can try this out. In principle I'm in favor of it, nothing wrong with more options. |
$mapImagickToVips = [ | ||
'northwest' => 'high', | ||
'north' => 'high', | ||
'northearth' => 'high', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a typo for "northeast" here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fixed in last commit
$tempFile->delete(); | ||
|
||
$command = sprintf( | ||
'%s thumbnail %s %s %d --height %d%s%s --size both --linear --intent absolute', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding, "both" isn't always appropriate for "size" here: the other thumbnailers don't scale up, only down (except for the "square" type).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fixed in last commit.
Can you explain what's going on with the usage of vips vs vipsthumbnail? It seems like vipsthumbnail has support for doing pretty much everything we'd want: specifying the size, scale up/down/both, crop type with It seems to me like this could just always use |
65f2ce6
to
159b93b
Compare
About the choice on "vips"/"vipsthumbnail" : i created the thumbnailer for the module Image Server and it requires some complex parameters to manage iiif requirements, so i worked with vips and the same here. Options are not exactly the same, so it's simpler to keep the same command line whatever the help said. |
A new thumbnailer, that has the main quality to be very quick (5 to 10 times quicker than ImageMagick, as the ad says). It is the one used by wikipedia, but it is implemented directly here, without extension.
I added a second thumbnailer "auto", in order to simplify the choice for the admin.
A point to check is that it is recommended to use a recent version (>= 8.6), because there is an interesting feature, the possibility to crop the square thumbnail according to the point of attention, that may not be the center (gravity). Nevertheless, it is not yet in the stable packages of the common linux server distributions.
As usual, it is already implemented in a module, the module Image Server, since some weeks. Indeed, it can be used to tile jpeg2000 and pyramidal tiff dynamically without the need to pre-tile images. Last version can manage pyramidal iiif images too.