Fix 32bpp image issues with the new JPEG export features