Page MenuHome

Remove the artificial dark edge in a translated or rotated white image.
Needs ReviewPublic

Authored by Yuting Cui (riverprawn) on Jul 31 2015, 11:14 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

The bilinear interpolation used in the translation and rotation operator assumes that all the pixels outside an image is (0.0, 0.0, 0.0, 0.0).
But this will result in an artificial dark edge when an white image is translated or rotated before a white background.

For example, we move a sRGB white image 0.5 pixels along the y-axis.
then the color along the line of x=0 will become (0.216, 0.216, 0.216, 0.502) in the linear color space.
When that image is mixed with a white background. the result is a single dark line on an white image.

The patched bilinear interpolation function will use the RGB value of the nearest point on the image when the sample area are not entirely outside the image. And the alpha value is interpolated as before.

Diff Detail

Event Timeline

Yuting Cui (riverprawn) retitled this revision from to Remove the artificial dark edge in a translated or rotated white image..
Yuting Cui (riverprawn) updated this object.
Yuting Cui (riverprawn) set the repository for this revision to rB Blender.