-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
ResampleOp.resample() doesn't clamp premultiplied alphas #537
Labels
Comments
Hi Sachin, Thanks for looking into this! If you are able to convert the above into code in a PR, I'd be happy to merge it! If not, I might still look into it some day. It's a bit down on my priority list right now though, as I hardly ever work with premultiplied images. Best regards, -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code for
ResampleOp.resample()
, when working with source images that have premultiplied alphas, doesn't ensure destination color samples are clamped to the alpha value. This can result in other ImageIO code somewhat mysteriously failing (in my case, I hadComponentColorModel.extractComponent()
returning a value beyond its expected 8-bit range).Regarding alpha handling, it seems like the ideal thing to do (based on this post in ImageMagick forums, and this part of ImageMagick's
resize.c
) would be something like:The text was updated successfully, but these errors were encountered: