Slightly smarter image comparison - we convert the image into the sRGB color space first, before making a 32-bit RGBA version.
This will work even for grayscale images, which would break previously due to having the wrong number of components.