[Canon RAW] Error in CR2 file from EOS-M

Started by Brouno, August 21, 2013, 05:35:12 AM

Previous topic - Next topic

Brouno

Hi,

On a canon EOS-M, when you get a cr2 file (raw file) with a M42 lens (or obviously without lens at all) , the aperture value is incorrectly reported by exiftool :

Aperture                        : 1.#INF

Verbose mode :
  | | 11) ApertureValue = 2147483648 (2147483648/1)
  | |     - Tag 0x9202 (8 bytes, rational64u[1]):
  | |         03cc: 00 00 00 80 01 00 00 00                         [........]

I guess conversion is a little lost.

If it can help, I can provide a such CR2 file

PS : tested with last exiftool version 9.35
Brouno.

Phil Harvey

Hi Brouno,

Yes, I have samples like this too.  But I disagree when you say ExifTool reports the value incorrectly:

Aperture Value                  : inf

Is correct.  The APEX value is too large to be represented as an F-number, so ExifTool reports "inf".

The Ap

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Brouno

Hi Phil,
Thx for your response.

OK, but when i try to copy exif from raw to jpg (with option -tagsfromfile ), I get this error :

    1 image files updated
Warning: Argument "1.$" isn't numeric in numeric gt (>) in ExifIFD:ApertureValue
(ValueConvInv) - ..\_MG_0234.cr2
    1 image files updated

I do that by script with a command line like that :
@call exiftool.pl -all= -tagsfromfile "..\file.cr2" -@ args.txt -overwrite_original_in_place file.jpg

the args.txt file contain (with other values)
-ApertureValue

and the dest file "file.jpg" is not updated

I found what when I do the same with -all in place of -ApertureValue like that :

@call exiftool.pl -all= -tagsfromfile "..\file.cr2" -all -overwrite_original_in_place file.jpg

No error, the dest file is updated, and the aperture value is 1.0

This last case is OK for me ;-)

Best regards,
Bruno


Phil Harvey

Hi Bruno,

What version of ExifTool are you using?

I get this:

> exiftool -ver
9.35

> exiftool a.cr2 -aperturevalue
Aperture Value                  : inf

> exiftool a.jpg -all= -tagsfromfile a.cr2 -aperturevalue
    1 image files updated

> exiftool a.jpg -aperturevalue
Aperture Value                  : inf


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Brouno

9.35 under perl (don't know if there is a diff)

Phil Harvey

The Perl version shouldn't make a difference.  Can you try my commands to see what you get?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Brouno

Yep, I already was doing this.
I test with the exe version also
both .pl & .exe version are in PATH environment variable

Start of the explanation ;-) :


D:\test>exiftool.exe -ver
9.35

D:\test>exiftool.pl -ver
9.35

D:\test>
D:\test>exiftool.exe a.cr2 -ApertureValue
Aperture Value                  : 1.$

D:\test>exiftool.exe a.jpg -all= -tagsfromfile a.cr2 -aperturevalue
    1 image files updated

D:\test>exiftool.exe a.jpg -ApertureValue
Aperture Value                  : 1.0

D:\test>
D:\test>exiftool.pl a.cr2 -ApertureValue
Aperture Value                  : 1.$

D:\test>exiftool.pl a.jpg -all= -tagsfromfile a.cr2 -aperturevalue
Warning: Argument "1.$" isn't numeric in numeric gt (>) in ExifIFD:ApertureValue (ValueConvInv) - a.cr2
Warning: No writable tags set from a.cr2
    1 image files updated

D:\test>exiftool.pl a.jpg -ApertureValue




D:\test>perl -ver

This is perl 5, version 16, subversion 1 (v5.16.1) built for MSWin32-x64-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2012, Larry Wall

Binary build 1601 [296175] provided by ActiveState http://www.ActiveState.com
Built Aug 30 2012 18:41:50

Phil Harvey

Odd.  OK, I guess the Perl version does make a difference.  I will have to wait until I can try this in Windows.  The hex dump of the ApertureValue in my test file is identical to yours.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Brouno

OK. Thanks a lot for your great tool which I'm using long time ago.

I have the workaround now ;-)

B.