-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Animated WebP resize doesn't keep loop and delay #1615
Comments
Hello @georgiopandarez, By default, it'll just process the first frame -- you need to ask for all frames. Try:
You can use |
Hi! Thanks for the prompt reply. The issue seems to be when resizing and converting. ie
This results in an image with no animation. The below python also shows issues:
The resized webp version shows a single image with the frames on top of each other. The resave shows an image without animation. Does one need to manually calculate page_height? |
It should work, I think. With this GIF: If I run:
I get an animation that plays correctly in chrome (I'd attach it, but github does not allow webp). Do you have an example that fails? Yes, you have to adjust It's best to use |
Sorry to waste your time. My code issue was that image.height returns the height of the image * the number of pages. I needed to take that into account when resizing. I tried to verify using vipsthumbnail but missed that -o placed the image in the same directory as the input, not relative to the program. |
Yes, it's relative to the input, so you can do eg.:
It's more like a pattern for the output path than a standard |
Hi,
When resizing an animation (webp or gif), metadata is lost and the resulting image is not animated. Converting animation without resizing works fine. Tested against debian libvips42 and latest master.
vipsthumbnail -s 200x200 -o /tmp/gif.webp samples/animated.gif
vipsheader -a /tmp/gif.webp
/tmp/gif.webp: 200x116 uchar, 3 bands, srgb, webpload
width: 200
height: 116
bands: 3
format: uchar
coding: none
interpretation: srgb
xoffset: 0
yoffset: 0
xres: 1
yres: 1
filename: /tmp/gif.webp
vips-loader: webpload
The text was updated successfully, but these errors were encountered: