Page 1 of 1

Image saved as JPEG has wrong orientation

Posted: January 9th, 2020, 3:13 pm
by ilan700
There seems to be a problem when saving a TIFF format file as JPEG. The original photo was taken with the camera rotated, i.e. the height of the image being larger than its horizontal dimension. When opening the saved JPEG file it shows up rotated. The height is now the shorter side.
I tried both the menu item "File -> Save as" and the "Export" transportation with the same result.

Re: Image saved as JPEG has wrong orientation

Posted: January 9th, 2020, 4:56 pm
by jsachs
So the TIFF file looks OK and the JPEG is rotated?

Can you email me a small TIFF file that saves incorrectly as a JPEG?

(jsachs@dl-c.com)

Re: Image saved as JPEG has wrong orientation

Posted: January 10th, 2020, 3:12 am
by ilan700
Yes, the TIFF looks OK both in PWP and in other viewers and the JPEG is rotated also in all viewers including PWP. The sample TIFF I have is not small - about 83 MB. I will try to find a smaller sample and mail it to you.

Re: Image saved as JPEG has wrong orientation

Posted: January 10th, 2020, 6:50 am
by jsachs
You should be able to just resize it and save it under a different name. Just double check that this does not fix the problem.

Re: Image saved as JPEG has wrong orientation

Posted: January 10th, 2020, 8:38 am
by ilan700
Resizing the TIFF file does not solve the problem. Anyway I uploaded a TIFF file sample to my Box account and sent the link to it to your e-mail. This issue is not urgent since I saw the problem only with TIFF files that were created with an old version of RawTherapee.

Re: Image saved as JPEG has wrong orientation

Posted: January 10th, 2020, 11:15 am
by jsachs
I looked into this and I have tested PWP with all possible orientations of rotated image sample files and it seems to works OK. Somehow, however, when ExifTool sets the orientation of the JPEG file (the same problem happens if you save as TIFF), the orientation code changes. I don't know if this is a bug or something I don't understand about the metadata. It looks like Pentax, at least in some versions of their raw format, saved a redundant orientation code, but I don't think that is causing the problem. I updated to the latest ExifTool, but the same problem persists. Does the same problem still happen if you use the current RawTherapee?

Re: Image saved as JPEG has wrong orientation

Posted: January 10th, 2020, 11:33 am
by ilan700
No, with the current RawTherapee version this does not happen. Thanks for looking into this.