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

master: fix interlaced PNG input handling with newer libpng versions #1296

Merged
merged 1 commit into from
Apr 27, 2019

Conversation

lovell
Copy link
Member

@lovell lovell commented Apr 26, 2019

It looks like commit 57ce5a3 prevents interlaced PNG handling working with newer libpng versions.

$ vipsthumbnail interlaced.png

(vipsthumbnail:31018): VIPS-WARNING **: 22:37:46.939: bad adaptive filter value
vipsthumbnail: unable to thumbnail interlaced.png

This PR ensures the new call to png_set_interlace_handling occurs before the first call to png_read_update_info.

(Calling png_set_interlace_handling for non-interlaced PNG images appears to be OK, or at least is sensibly ignored internally by libpng.)

@jcupitt jcupitt merged commit ce8aff8 into libvips:master Apr 27, 2019
@jcupitt
Copy link
Member

jcupitt commented Apr 27, 2019

Ooop. Nice!

I'll add a test for this.

jcupitt added a commit that referenced this pull request Apr 27, 2019
@lovell lovell deleted the png-interlace-handling-ordering branch April 27, 2019 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants