Image saved as JPEG has wrong orientation

Moderator: jsachs

Post Reply
ilan700
Posts: 11
Joined: October 11th, 2019, 1:12 pm
What is the make/model of your primary camera?: Pentax KP

Image saved as JPEG has wrong orientation

Post 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.
jsachs
Posts: 4222
Joined: January 22nd, 2009, 11:03 pm

Re: Image saved as JPEG has wrong orientation

Post 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)
Jonathan Sachs
Digital Light & Color
ilan700
Posts: 11
Joined: October 11th, 2019, 1:12 pm
What is the make/model of your primary camera?: Pentax KP

Re: Image saved as JPEG has wrong orientation

Post 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.
jsachs
Posts: 4222
Joined: January 22nd, 2009, 11:03 pm

Re: Image saved as JPEG has wrong orientation

Post 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.
Jonathan Sachs
Digital Light & Color
ilan700
Posts: 11
Joined: October 11th, 2019, 1:12 pm
What is the make/model of your primary camera?: Pentax KP

Re: Image saved as JPEG has wrong orientation

Post 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.
jsachs
Posts: 4222
Joined: January 22nd, 2009, 11:03 pm

Re: Image saved as JPEG has wrong orientation

Post 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?
Jonathan Sachs
Digital Light & Color
ilan700
Posts: 11
Joined: October 11th, 2019, 1:12 pm
What is the make/model of your primary camera?: Pentax KP

Re: Image saved as JPEG has wrong orientation

Post by ilan700 »

No, with the current RawTherapee version this does not happen. Thanks for looking into this.
Post Reply