add jpg mode in image_transpose