CR2 files

Started by Aubrey, February 19, 2019, 09:27:53 PM

Previous topic - Next topic

Aubrey

Following update to 2019.2.2
This evening I have taken a portrait image using Canon G16. Recording both CR2 and JPG images simultaneously.

On loading into IMatch JPG is correctly oriented, however the CR2 image appears as landscape.
I have tried rotating the CR2 image using:
Rotate and Transform|Orientation Exif rotate 90 CW This has no effect.
I have reset rotation - this turns the jpg to landscape (as I would expect), and on applying CW90 rotates correctly back to portrait, but CR2 remains landscape.

Test:
I have taken a CR2 portrait file taken a few weeks ago and already loaded into IMatch. This was in the correct orientation. When I apply F5 force update it rotates to landscape and I cannot rotate back to portrait.

As files are large I cannot post here, I can send the two files(CR2 JPG) recorded this evening by email for further analysis.

Other:
I uninstalled and reinstalled FastPicturecodec (3.8.097) as the Help|Support|WIC diagnostics was giving errors before the re-installation
Codec result attached.

Aubrey.

Update file sent to support using reference Topic 8813

Mario

Looks like your WIC codec can only extract the embedded preview (?)?
IMatch uses whatever EXIF orientation it finds in the file. But the FPV codecs have a setting which makes them rotating the file before delivering it to the calling application (IMatch) but they don't change the EXIF orientation in the file. And this causes IMatch to rotate the file wrong, because it has no way to tell that the FPV codec has already returned that file.

Are you using Windows 10? Does the default codec not work with your files? The FPC codecs have not been updated for two years now so I guess they are aging and are no longer required...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Aubrey

I'm using Windows 10
I noticed that the FPV code s have not been updated. I had checked his website.

I've always used FPV as I thought they were best, perhaps no more  :-\
Tomorrow I'll remove FPV and check results again.

Should I download Canon and Nikon codecs (I have Canon and Nikon cameras) and install these, or just stick with Windows?
Thanks, Aubrey

Mario

If the W10 codecs handle your files and you are satisfied with the outputs you see in IMatch - the less stuff you install the less problems you'll have.
Nikon / Canon should be able to produce the best possible renditions in their WIC codecs, though.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Aubrey

Resolved!

Tests:
1. Removed FPV - same result, CR2 still not rotating
2. Added Canon codec - same result CR2 still not rotating

3. Noted "Prefer photools.com RAW Processing" set to Yes, changed to No - same result, CR2 not rotating

4. Reinstalled FPV, leave "Prefer photools.com RAW Processing" set to No - file rotating correctly

Mario

Mysterious...

Which EXIF orientation is shown for the file in the ExifTool Command Processor?
IMatch uses the EXIF orientation to rotate the image data. This is usually a no problem unless the EXIF orientation is wrong or does not match the actual rotation of the image data in the file.

In such (rare) cases either the EXIF orientation needs to be fixed or a virtual rotation has to be applied to counter the wrong EXIF orientation.
Early cameras always had problems with their gyro sensors and sometimes marked the files wrong. Newer models and smart phones usually get this right.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Aubrey

Quote from: Mario on February 20, 2019, 10:08:00 AM
Mysterious...

Which EXIF orientation is shown for the file in the ExifTool Command Processor?
IMatch uses the EXIF orientation to rotate the image data. This is usually a no problem unless the EXIF orientation is wrong or does not match the actual rotation of the image data in the file.

Original file (on SSD card) shows Rotate 90 CW. (File is from a Canon Powershot G16, vintage about 2014, no gyro etc!)

When I switch back to (FPV still installed):
Prefer photools.com RAW Processing" set to Yes I get the following, and although rotation is set to 90 CW, CR2 image goes to landscape after Force Update.

WIC is having issues processing the file

WIC: Testing file 'E:\Processed Images\2019\1902 Feb\Hash\2904\temp\IMG_4736.JPG'
   Thumbnail: Codec 'JPEG Decoder'
      (GetThumbnail failed (88982F44 The bitmap codec does not support a thumbnail.).) 0x0 pixel in 0 ms.
   Preview: Codec 'JPEG Decoder'
      (GetPreview failed (88982F81 The operation is unsupported.).) 0x0 pixel in 0 ms.
   Full resolution: Codec 'JPEG Decoder'
      () 2816x2112 pixel in 0 ms.

When I switch back to:
Prefer photools.com RAW Processing" set to No I get image in portrait form, also WIC appears to process file completely

WIC: Testing file 'E:\Processed Images\2019\1902 Feb\Hash\2904\temp\IMG_4736.CR2'
   Thumbnail: Codec 'Canon Raw Decoder (FastPictureViewer Codec Pack)'
      () 120x160 pixel in 16 ms.
   Preview: Codec 'Canon Raw Decoder (FastPictureViewer Codec Pack)'
      (GetPreview failed (88982F81 The operation is unsupported.).) 0x0 pixel in 0 ms.
   Full resolution: Codec 'Canon Raw Decoder (FastPictureViewer Codec Pack)'
      () 1200x1600 pixel in 0 ms.



In late January I had an issue with rotation of NEF files:
https://www.photools.com/community/index.php?topic=8749.msg61581#msg61581

I never did get it sorted, but saw that Mario was doing work on rotation and thought this might be the solution, and therefore left it until the latest update.

Those issues have now disappeared when I set:
Prefer photools.com RAW Processing" set to No


I'm happy to close the discussion as for me the issue is resolved; if there is more testing you would like me to do, I'm willing to assist.

Aubrey.






Mario

JPEG files are not processed by WIC or the RAW processing module in IMatch.
IMatch loads JPEG files via a 3rd party imaging library based on the reference JPEG implementation. This implementation automatically respects the embedded EXIF orientation value. It is not uncommon for old files to have an EXIF orientation tag which is actually wrong with respect to the physical orientation of the image data in the file. Resetting the EXIF to "Neutral (Default)" usually solves this.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Aubrey

Quote from: Mario on February 20, 2019, 11:51:45 AM
JPEG files are not processed by WIC or the RAW processing module in IMatch.

I'm aware of this.
The issue is with the CR2, Canon raw files. The Powershot G16 generates both raw and jpgs.

The first thing I did with the files was to reset orientation, and then apply exif rotation 90CW. The raw file remained in landscape mode, despite the exif showing that the 90CW had been removed and then applied.


Aubrey.

Mario

But is this OK now? Else I would need one of your CR2 files to see which EXIF orientation it contains (there may be different for the preview and the RAW data) and what IMatch makes of it.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Aubrey

Quote from: Mario on February 20, 2019, 01:42:31 PM
But is this OK now? Else I would need one of your CR2 files to see which EXIF orientation it contains (there may be different for the preview and the RAW data) and what IMatch makes of it.

All is OK having set Prefer photools.com RAW Processing" set to No. So no need for further investigation. I'm happy with the solution, for me the issue can be closed.

Quote from: Mario on February 20, 2019, 01:42:31 PM
Else I would need one of your CR2 files to see which EXIF orientation it contains (there may be different for the preview and the RAW data) and what IMatch makes of it.

I did send you a zip file of jpg and CR2 file last evening to support@photools.com.
The Subject is Topic 8813.


Mario

Quote from: Aubrey on February 20, 2019, 01:55:33 PM
I did send you a zip file of jpg and CR2 file last evening to support@photools.com.
The Subject is Topic 8813.

Ah, then it is still buried under over 70 emails pending. I did not have much time in the last days, 100% went into shipping IM2019.2
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

Hi,

I have today tested your CR2 file and the JPEG.
Findings:

- The FastPicture Viewer CR2 codec installed on my system processes the CR2 just fine.
IMatch WIC diagnosis shows these results:

   Thumbnail: Codec 'Canon Raw Decoder (FastPictureViewer Codec Pack)'
      () 120x160 pixel in 15 ms.
   Preview: Codec 'Canon Raw Decoder (FastPictureViewer Codec Pack)'
      () 1200x1600 pixel in 0 ms.
   Full resolution: Codec 'Canon Raw Decoder (FastPictureViewer Codec Pack)'
      () 3045x4072 pixel in 0 ms.


A thumbnail, small preview and full-size RAW can be extracted.

- The EXIF orientation is specified as rotate 90°CW, and this rotation is performed by IMatch.

- Both files show with the proper orientation (portrait) as thumbnails and in the Viewer / Quick View panel.

Do you perhaps have configured the FPV codecs to always perform rotation? This is a known issue because it then returns the already rotated image to the calling application (IMatch) but the EXIF data stays unchanged, so IMatch has no way to tell that the codec does not return the true orientation.

From what I can tell, all is well with these files, the orientation and how the FPV codecs process the RAW.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Aubrey

Quote from: Mario on February 26, 2019, 08:14:36 PM

From what I can tell, all is well with these files, the orientation and how the FPV codecs process the RAW.


That was my findings also.
The issue was finally traced to the setting "Prefer photools.com RAW Processing"

When I set:
"Prefer photools.com RAW Processing" set to Yes. There are problems with the orientation of the CR2 file, it will never display in portrait form.

The problem goes away when I set
Prefer photools.com RAW Processing" set to No and use FPV.

Aubrey.


Mario

I have analyzed your CR2 file.

When processing it via LibRaw for the thumbnail, the embedded preview is used (large enough). In this mode, LibRaw tells IMatch that the image needs be rotated and IMatch does so. This causes the wrong orientation of the thumbnail. Apparently LibRaw finds something in the image which makes it think that the image needs to be rotated.

I stopped there with the analysis. Anything more would be too complicated and time-consuming.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Aubrey

Hi Mario,
Your findings are interesting... I wouldn't be surprised that Canon is at fault; at least issue is identified.
It get's sorted out using FPV, so it's not it's really not an issue.

Must be something with the G16 Canon camera.
I wonder does any other user make CR2 files with a G16 Canon?

Quote from: Mario on February 28, 2019, 07:04:54 PM
I stopped there with the analysis. Anything more would be too complicated and time-consuming.

Let's move on and close the issue. As I sometimes say... "life's too short"

Thanks for checking,
Aubrey.