RT Misreading Image Orientation

I am using RT for image processing, but for some reason I am getting images where the orientation is incorrectly set and exported. This means the images are rotated incorrectly, and even when I try to rotate them, when exporting, the images remain incorrectly oriented.

The Exif metadata says its is 8688 x 5792, but on the images it says 5792 x 8688.

So it displays and exports the images as portrait, and NOT as the original landscape.

I have no idea why this is happening and it is a big problem when batch processing in the command-line in RT.

Please help, much thanks,

Rehuerta

http://rawpedia.rawtherapee.com/How_to_write_useful_bug_reports

Furthermore:

  • You’re looking at the wrong tag, you should be looking at tag 0x0112 Orientation
  • Editing MakerNotes is dangerous.
  • Orientation sensors in cameras which are pointed down return fuzzy orientations.

The orientation sensor of your camera obviously fails in this case.

The values (width and height) are perfectly fine

Use these buttons to rotate the image in case the orientation sensor fails.
grafik

Btw: I was told that the orientation sensor of some Canon cameras sometimes gives wrong orientation information even if it’s disabled.

Thanks for getting back to me. I apologize, but I was out of town this week and was unable to reply. I just looked up the tags you mentioned in exiftool, and it says that my images have normal orientations:
Capture

These images are .cr2 files. If you’re aware of anything else I could try, I’d really appreciate it!

Please upload a sample image where orientation is correct and one where it is incorrect using https://filebin.net/

Thanks for your quick reply. I can’t access filebin.net at work, so I uploaded the images to Google Drive instead. I hope that is okay. You should be able to access the folder even if you don’t have a Google account.

https://drive.google.com/open?id=1Nw8yS1sWRi9O8wZyoVsMLDU_0__Y7xKf

The output images (where the issue is seen) are .jpgs. I also included the LR .pp3 files with the original .cr2 images (in the input folder). The image with the wrong orientation is 002045-1004171644338-Cam1, and the image with the correct orientation is 002795-1004171720095-Cam1.

Muchas gracias,

Rehuerta

@rehuerta I will try to look at them over the weekend. Before I do, tell me, have you manipulated them in any way? e.g. have you rotated them in-camera after shooting, or rotated them on your computer?

@rehuerta The jpegs embedded in the raw files have different orientation too (one is portrait and the other one is landscape orientation)

1 Like

I don’t believe they were rotated in-camera or on a computer, but I understand that they were georeferenced and converted to .cr2 from another format (I believe a pure raw format). Lighting adjustment is one of many steps in our workflow (not the first step), and we’re hoping to use RawTherapee to replace Lightroom, but Lightroom doesn’t have this orientation issue. The camera was a Canon EOS 5DS. Hope this helps!

I have been figuring out ExifTool and it seems to be working well, and I have figured out how to adjust the image’s and the thumbnail’s orientation. But in response to @heckflosse possible solution, I have not seen how to change the embedded JPG’s orientation within a CR2 image.

Would you know the cmd ExifTools tags for retrieving and changing the embedded JPG orientation EXIF data for CR2’s?

Gracias

For what it’s worth, while working orientation behavior in my software, I found this set of images that were very useful in validating my code:

@heckflosse How did you check the orientation of the embedded jpegs? I have been trying to find this function through ExifTool, but I have had not luck.

I have used this: exiftool -RawJpgInfo -RawJpgSize *.cr2 but nothing seems to come up.

Muchas gracias in advanced

This is very interesting

https://github.com/Beep6581/RawTherapee/issues/4293

1 Like

@heckflosse This is fantastic! Thank you so much.

I applied the patch to the RT code which I have downloaded from the RT Git.

I am almost there, I just need to build the code, but Cmake will not build the RT code (I do have Visual Studios installed). I am hoping you would be able to send me an executable file, or help me understand the best way to build the RT code.

Muchas gracias for all you help.

Rehuerta

1 Like

@rehuerta You may need to clear the cache because it contains the old orientation.

Edit: Compilation instructions for Windows are here

As a benefit you will also get faster processing when you build RT yourself :slight_smile:

Don’t hesitate to ask in case of problems, though preferably in a different topic or in pm

1 Like

patched

RawTherapee_dev_5.3-442-gfa4e07b8_WinVista_64.zip

uploaded at
https://keybase.pub/gaaned92/RTW64NightlyBuilds/

@rehuerta
Even if I provide a build, I encourage you to build yourself. Follow instructions carefully and you are welcome to ask for help if needed.

1 Like

@heckflosse and @gaaned92,

Thanks a million for your help! I was able to build RT and the fix worked flawlessly!

Muchas Gracias!