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.