jimp-dev / gifwrap

A Jimp-compatible library for working with GIFs
MIT License
73 stars 17 forks source link

Example of decoding Gif frames into PNGs. #10

Open phtaylor opened 6 years ago

phtaylor commented 6 years ago

Hi, we are migrating to using gifwrap to extract Gif frames, and we seem to be having a lot of trouble getting a correct frame. Would it be possible to provide some simple sample code that shows how to handle using the frame bitmap to generate a sequence of Pngs. One for each frame.

This is the result we get now. After decoding a few frames we get extensive tearing, indicating we have something incorrect.

image

EchoTiger commented 5 years ago

I'm getting the same thing. It seems like there's something wrong with the decoder.

Shame as well, I can't really find anything that's as simple of a solution as this.

phtaylor commented 5 years ago

We ended up migrating to the amusingly named gifuct https://github.com/matt-way/gifuct-js

jtlapp commented 5 years ago

Sorry to take so long to get back with you. This looks like the sort of bug that #18 would have fixed. If you can provide the problem gif, I'd be happy to test it.

fahimk commented 5 years ago

Not sure if this is the same issue, but this GIF seems to get messed up when I read and then write it: https://media.tenor.com/images/c674ba98c40f6793eaf10a1356c1c36a/tenor.gif

Screenshot of output: tenor-output