-
-
Notifications
You must be signed in to change notification settings - Fork 700
fix the pngsave bitdepth param #4516
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
Conversation
Saving an 8-bit image as 16-but PNG (and vice versa) didn't work correctly. See #4512
I don't think any other savers have the same issue. |
This is a bit more complicated than you'd think because For example:
The float scrgb image becomes uint8 srgb, so precision is lost. But:
Now it stays float. This seems unpredictable and is probably a bad idea. What do you think? Should colourspace conversion to srgb always output uint8, and conversion to rgb16 always output ushort? There's a potential loss of precision, but if you want high precision srgb you should probably be using scrgb. |
it now enforces the format, so srgb -> srgb conversion (for example) will make a uchar image
and revise coments a bit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
This became unnecessary after PR libvips#4516.
This became unnecessary after PR #4516.
Saving an 8-bit image as 16-but PNG (and vice versa) didn't work correctly.
See #4512