Convert RGBx to RGB24 in SaveJPEG()