Skip to content

spngsave: Don't shift indexed pixels #3101

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

Merged

Conversation

DarthSim
Copy link
Contributor

Hey!

The commit ca2796a have broken saving paletted PNGs with low bit-depth (< 8). This happens because palette indexes can't be larger than 1 << bitdepth, so shifting makes all of them zeroes.

Fixes imgproxy/imgproxy#1013

@jcupitt jcupitt merged commit 982a835 into libvips:8.13 Oct 19, 2022
@jcupitt
Copy link
Member

jcupitt commented Oct 19, 2022

D'oh! Thanks for fixing this dumb thing.

@jcupitt
Copy link
Member

jcupitt commented Oct 19, 2022

... I updated master as well.

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.

2 participants