matt-way / gifuct-js

Fastest javascript .GIF decoder/parser
MIT License
431 stars 64 forks source link

Issues with few Giphy GIFs #19

Closed nuthinking closed 3 years ago

nuthinking commented 3 years ago

I started using this great library in conjunction with Giphy (since I don't render their GIFS as plain HTML). In few cases I noted some issues. For example:

Is there any interest in addressing these issues? Should I keep reporting them?

Thanks again for the library!

matt-way commented 3 years ago

I'll look into them when I get the chance next. Just had a baby so going to be at least a week I reckon. Any hints as to what you think the problem is, or able to elaborate a bit more?

nuthinking commented 3 years ago

@matt-way congratulations! 🎉

No idea, to be honest. But I will keep an eye to see if I spot some patterns. Maybe checking the author to see which tool was used to generate them.

nuthinking commented 3 years ago

Will post here some other examples, if you don't mind. You can test them here too. I make a Spritesheet out of them (but I tested them on the demo page too).

gfSeQdxz222DbyK6ig download (5)

xxYAxDqPhYd7wKtWss download

nuthinking commented 3 years ago

FYI I tested them with libgif-js and it extracted the data correctly without glitches. GIFGroover instead has some glitches with the second one.

jeetiss commented 3 years ago

I've experienced the some problem and this is looks like some frames patch previous. @matt-way do you have any idea why it happens and how to detect this special frames?

https://user-images.githubusercontent.com/6726016/108091573-e551ae80-708c-11eb-8380-fde9987de8e6.mov

matt-way commented 3 years ago

@nuthinking Does the added disposal check in the demo renderer (by @jeetis) solve your issue? As I mentioned in the PR, this lib is more about the parsing than the rendering. While a better renderer demo is ideal, it is up to the lib user to roll their own.

nuthinking commented 3 years ago

@matt-way I didn't realize I have to maintain another context during the rendering. I will check and confirm. Thanks!

nuthinking commented 3 years ago

Looks like this fixed it for me. Thanks and sorry for the false alarm!

https://user-images.githubusercontent.com/163635/108524781-b11a0000-72cf-11eb-8432-b5d217c501a2.mp4

nuthinking commented 3 years ago

@matt-way remains the dims issue with this GIF.

jeetiss commented 3 years ago

@nuthinking this is not the dims problem this GIF have local color table with 16 colors on first frame and image data that fills with 16 and this color is transparent on that frame

strange situation

Снимок экрана 2021-02-23 в 16 13 38

rendered first frame:

Снимок экрана 2021-02-23 в 16 11 14
nuthinking commented 3 years ago

I can confirm 2.1.1 fixes this issue. Thanks @jeetiss for the fix and @matt-way for the release 🙌