Skip to content
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

Some GIF images aren't loaded properly #1543

Closed
DarthSim opened this issue Jan 31, 2020 · 3 comments
Closed

Some GIF images aren't loaded properly #1543

DarthSim opened this issue Jan 31, 2020 · 3 comments
Labels

Comments

@DarthSim
Copy link
Contributor

My user sent me a GIF that isn't loaded properly by libvips. It looks like libvips doesn't properly blend frames.

bad4

The result of vipsthumbnail -v --size=200 -f tn_bad4.gif ~/Work/pictures-fixtures/bad4.gif[n=-1]:

tn_bad4

The result of vipsthumbnail -v --size=200 -f tn_bad4.png ~/Work/pictures-fixtures/bad4.gif[n=5 ]:

tn_bad4

Frames montaged with gif_anim_montage:

frames

@jcupitt jcupitt added the bug label Jan 31, 2020
@jcupitt
Copy link
Member

jcupitt commented Jan 31, 2020

Huh you're right. I'll have a look. Thanks for the report!

jcupitt added a commit that referenced this issue Jan 31, 2020
This GIF has dispose set to DISPOSAL_UNSPECIFIED and seems to mean
transparent.

This patch makes gifload use DISPOSAL_UNSPECIFIED as well as _DO_NOT to
mean reuse previous frame.

Thanks DarthSim.

See #1543
@jcupitt
Copy link
Member

jcupitt commented Jan 31, 2020

That GIF has dispose set to DISPOSAL_UNSPECIFIED to mean "reuse previous frame". I think it should probably be DISPOSE_DO_NOT, from looking at the spec.

I've made gifload treat UNSPECIFIED the same as DO_NOT, and it seems to fix rendering.

This will be in 8.9.2, thanks!

@jcupitt jcupitt closed this as completed Jan 31, 2020
@DarthSim
Copy link
Contributor Author

Thank you! GIFs are still pretty terra incognita for me :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants