Better quality filtering for images
Make alphaForNBlends not get stuck in a loop if n < 1.0