Fix blending of semi-opaque pixels in average and bilinear resamplers (#4875)