-
-
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
Encounter unexpect result when extend static gif and covert to webp #2890
Comments
Thanks for reporting this, I can reproduce it too. It's a bit of an edge case due to the output image height being a multiple of the "page height" of the non-animated input. The work-in-progress PR #2789 might address this, and a possible workaround for now is to manually set the sharp(body, { failOnError: false })
.resize(600, 600)
- .webp({ quality })
+ .webp({ quality, pageHeight: 600 })
.toBuffer(); It could be worth fixing this in libvips too, so it removes page height metadata from non-animated GIF input, so I'll take a look to see if this is possible and/or makes sense. |
@lovell |
v0.29.2 now available with the fix for this. |
Hello :)
First, Thanks to provide awesome library!
I am using Sharp library to convert to webp or resize image.
But I detect a strange bug while using it.
I was extending square static gif image to 600 x 600 and converting gif to webp. (I have no idea why this gif image is static. It is probably a user's mistake.)
I expected 600 x 600 webp, but I couldn't get. After testing it with various cases, an error occurs when trying to widen the width or height of static gif by multiple and convert it into webp.
Could you check it out?
Thanks :)
The text was updated successfully, but these errors were encountered: