-
-
Notifications
You must be signed in to change notification settings - Fork 760
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
Jimp stucking at a corrupted GIF file #353
Comments
Thanks for this. I'm writing a package that adds GIF support to Jimp by wrapping it, will see if I can fix it in my wrapping module. |
omggif.js is hanging. The GIF appears to be ill-formed, but the decoder shouldn't be hanging. I think it's fair to simply reject the image. I'll look into it. No one is maintaining Jimp any more, but I'll be able to fix it from my GIF wrapper. You don't want to be using Jimp directly for GIFs anyway. |
@jtlapp Nice work for finding out what the problem is. |
I've provided GIF support and a working decoder in |
@jtlapp any reason why you didn't try to add GIF support directly to jimp? |
Oh sorry, somehow I missed the question. There are two issues related to GIF support. One is getting single frame GIFs to load at all. The problem was in omggif. I submitted the problem to omggif along with a solution, although the author opted for a different solution. Use the existing omggif repo, instead of a local copy. and this problem will go away. The second issue with GIFs is supporting animations. Jimp is architected to operate on exactly one image at a time. All the stuff that's needed to support GIF animations is outside the purview of Jimp. It's stuff that would wrap Jimp. I attempted to wrap Jimp but found the Jimp constructors so non-standard that it wasn't possible without great headache. Instead, I made a Jimp-compatible solution that allows you to copy the I guess the final reason is that Jimp is written inefficiently and applies a mistaken understanding of async callbacks. I didn't want to build anything on it. |
I found this GIF file will cause Jimp stuck forever (right click to save):
Code snippet for reproducing this issue:
The text was updated successfully, but these errors were encountered: