Portrait appearing in landscape

Started by stefanjan2, June 14, 2024, 02:31:11 PM

Previous topic - Next topic

stefanjan2

I am travelling with my laptop at the moment so don't have access to my desktop.

Portrait photos from my Canon CR3 and Panasonic RW2 are coming into imatch in landscape. In other Windows software and file manager they have the correct orientation.

I guess there is something wrong with the rotate settings in imatch. I have tried changing them but problem remains. Would appreciate a hint as to which settings to change and to what?

Mario

Do you use WIC or LibRaw (photools.com RAW processing enabled in Edit > Preferences > Application).
Windows 10 or 11?

This effect usually happens only for certain RAW formats (Olympus usually, sometimes Canon) when the embedded preview has not been stored in "default" (unrotated) orientation and also has no separate EXIF orientation tag. Or a wrong one.

WIC and/or LibRaw then deliver the wrong orientation info for the preview to IMatch, and IMatch cannot tell if the orientation is right or wrong.

This got so annoying a few years ago that I had to add extra options (E > Preferences > Application) which basically tell IMatch to ignore the orientation data delivered by WIC/LibRaw.

What is "other Windows software" and what is "file manager"? Windows Explorer?
Windows Explorer uses WIC (guess) and usually agrees with IMatch regarding rotation. Or the other software is just lucky in your case because if always ignores rotation info and is right in the case of your images.

You can always use as virtual rotation (Virtual Transforms) to tell IMatch how to rotate the image for display.
Or did into the RAW data or embedded preview and set the correct EXIF orientation, if really needed.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Hertzberg

#2
I have this issue too, with CR3 files. I am running Win 11, and the files all look correct in File Explorer icons and in darktable. I tried enabling Prefer photools.com RAW Processing, Rotated embedded preview (WIC) and Rotate embedded preview (photools.com RAW processing), and then did a cache rebuild on the affected folder but it had no effect. The exif metadata specifies 'Rotate 270 CW'; if the preview did that it would look correct.
The affected files are mixed in a large folder with landscape images. Individual virtual rotation would be quite time consuming. Sorting by orientation is ineffective. Photos I took a year ago with the same camera don't have this problem. I tried removing the folder from the database and rescanning but the problem remains.

Mario

I understand that both the Windows WIC codec for CR3 and LibRaw produce the wrong orientation for some of your files?

Please understand that IMatch has no way to tell. It asks WIC / LibRaw to rotate the image as specified in the EXIF orientation record and that's it. IMatch cannot know if the EXIF orientation is wrong or if the preview in the RAW file (if used) has the wrong orientation or not.

Interestingly, this usually happens only with ORF files. And very rarely with the proprietary Canon CR3 files.

Send me a sample image with this problem to support email address. I'll have a lock. Please include a link to this topic in your email, since I get many emails per day.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mopperle

Could it be that it depends on the camera model? I use a EOS R which also produces CR3 files, but never came across this issue.

Mario

Quote from: mopperle on September 25, 2024, 12:59:21 PMCould it be that it depends on the camera model? I use a EOS R which also produces CR3 files, but never came across this issue.
Yes. This depends on the camera model / firmware.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

franzp

Hello Mario,
I have the same problem with Canon R6, but also with Canon 5D Mark III.

Mario

Did you try both Windows WIC (default) and the photools.com RAW processing?
After switching you have to force an update of affected files by selecting them in a File Window and then pressing <Shift>+<Ctrl>+<F5>.

If both fail to detect orientation / rotate the image correctly, there is little I can do.
I use a newer (non-production) version of LibRaw for IMatch 2025 and maybe something has changed.
Feel free to send me a sample image (include a link back to this community topic).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

franzp

Thanks for the quick reply.
It works with the photools RAW processing setting. The WIC codec seems to have a problem with Canon RAW files. :)

Mario

QuoteThe WIC codec seems to have a problem with Canon RAW files.
This can be. There are over 50 variants of CRW/CR2/CR3 in use today.

Canon should provide a WIC codec to their paying customers which handles all their formats.
That's the idea of WIC: Windows provides the framework so applications can handle RAW and other proprietary formats and the camera vendors provide a WIC codec that handles all their formats.

Nikon does.
Canon does not. Because - money, I suppose.

I doubt it would cost them much to create and maintain a WIC codec. They have all the code for their cameras anyway.
But Canon gives a sh*t and leaves their customers at the mercy of Microsoft, Adobe and similar vendors or one-guy projects like LibRaw.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

#10
Thanks to @Hertzberg for sending a sample CR3.

I can reproduce the orientation problem using the CR3 Windows WIC codec.
I cannot reproduce the problem when the photools.com RAW process (using LibRaw) is enabled. The orientation is correct in this case. Seems Windows WIC does not understand this CR3 variant yet.

I recommend to switch to LibRaw (Edit menu > Preferences > Application and search for raw on that page). Enable Prefer photools.com RAW processing and close with OK.
Important: Select the files with wrong orientation in a File Window and press <Shift>+<Ctrl>+<F5> to force a reload using LibRaw. Write-back before if needed! Just changing the setting does nothing to files already in the database.

If this does not fix the problem, I can only assume that the newer LibRaw version I currently test for IMatch 2025 somehow handles the files better. I've migrated IMatch 2025 to a newer LibRaw version and also integrated the Adobe DNG SDK on top, in order to allow LibRaw to process DNG files with previews stores in the new JPGXL Adobe introduced in some of their products.

There are my settings:

Image1.jpg

(The DNG setting is IMatch 2025 only, ignore it).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Hertzberg

Thanks Mario. Your suggestions did not have any effect, but I have a workaround: I used the Canon Digital Photo Professional program to convert the whole folder to TIFF. The resulting images are rotated correctly. I'll look forward to iMatch 2025.

Mario

#12
As I said above, this is always a bit random. Usually, if the WIC codec fails, LibRaw correctly handles the orientation.
That both WIC and LibRaw fail is really rare. I've spend some time with this in the past but was unable to find an error or something to change.

Maybe your image gives me some additional clues. Weather's bad and maybe I'll look into the WIC path again over the weekend. Once thing I've found already is that some routines in WIC apparently end up in an endless loop when I force WIC to apply the RAW EXIF orientation also to the preview. The routines never return... >:(

The latest LibRaw seems to handle the image so we should be good on that path.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

stefanjan2

Quote from: Hertzberg on September 26, 2024, 07:36:45 PMThanks Mario. Your suggestions did not have any effect, but I have a workaround: I used the Canon Digital Photo Professional program to convert the whole folder to TIFF. The resulting images are rotated correctly. I'll look forward to iMatch 2025.
Did you follow Mario's instructions to the letter. I also have CR3 portrait images which were displaying correctly on my desktop but not my laptop.

After changing the settings to match Mario's image. hit apply, then CTRL SHIFT F5 then force update worked for me.