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

Make scaling alpha aware #41

Closed
spillerrec opened this issue Jul 31, 2014 · 1 comment
Closed

Make scaling alpha aware #41

spillerrec opened this issue Jul 31, 2014 · 1 comment
Assignees
Milestone

Comments

@spillerrec
Copy link
Owner

Not keeping alpha into account when scaling can create artifacts, as the otherwise "transparent" colors are included in the interpolation, causing black/white to bleed into the image.

@spillerrec
Copy link
Owner Author

It is not quite correct yet, but it is close.
AverageRender was modified to scale the output planes so that we use the alpha generated for each plane. The ImageEx::alpha_plane() is for the full scale image, so it cannot directly be applied to images which has been sub-sampled. This is likely going to pop up again in the future, so we need some way to deal with this. An assert is a good start.

I changed the interface on ImageEx to always require to specify an alpha plane. The following classes didn't have an obvious alpha plane to use, so they were given a null plane:

  • EstimatorRender
  • ModifiedPlane

They should be corrected. Consider checking if all plane scaling also uses the alpha version as well.

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

No branches or pull requests

1 participant