-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Enhancement: improve animated/multipage image resizing #2275
Comments
Why not load all pages by default, though? Is BC the only concern? I guess it can break "convert first frame of gif/tiff to jpeg" scenario. |
Why not simply apply all operations on all frames? I would need compositing functionality for animated gifs. Duplicating every method to apply for all frames would be a rather complex task. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi, was a decision ever made on this enhancement? A resize function for multiple frames would be really useful. Failing that, is it possible to do with the current sharp API, and could some docs be added instead for the mean time? Thanks |
The future possible enhancement in PR #2789 may remove the need to provide |
Hi, @lovell How about expose
PROPOSED API sharp.arrayjoin([img0, img1, img2, ...], {}) |
This oft requested feature is now available in v0.30.0 - enjoy! Thanks again, as always, to @kleisauke for doing the work to implement it. |
Update sharp version to support animated image resizing You can also take a look here. lovell/sharp#2275
Update sharp version to support animated image resizing You can also take a look here. lovell/sharp#2275
Given Safari will soon be supporting WebP, I suspect a shift away from the use of animated GIF images towards the use of animated WebP images, which are significantly more efficient, is coming.
Operations like extract and rotate on individual pages/frames might be rather complex, but a possible newresizePages
operation to resize all pages/frames in an image to a given width or height (these would have to be mutually exclusive, plus an optional kernel), would be relatively straightforward.Update: this has been implement via #2789, which sets page heights automatically using the existing resize API.
The text was updated successfully, but these errors were encountered: