Canon AspectInfo tags

Started by pbstewart1960, May 17, 2012, 06:31:33 PM

Previous topic - Next topic

pbstewart1960

Based on the data in the .CR2 files from my 5D2 and my 5D3, it appears these camera at least emit data in a different format.  Rather than 3 int32u's (ratio, cropped width, cropped height), I am seeing 5 int16u's, namely ratio, cropped width, cropped height, x-coordinate of upper left corner of crop, and y-coordinate of upper left corner of crop.  The ratio ID's do appear to conform to the values you have listed.

Just thought I'd pass this info along.  Maybe someone else can confirm/corroborate it.  I did not attach an example .CR2 because they are huge.

Thanks.

Phil Harvey

Yes, thanks.  All models actually store  5 int32u's, but only the first 3 are decoded.  The last 2 values are always zero in all my samples, so I can't say for sure that they are crop offsets.  Are they non-zero in any of your samples?

- 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 ($).

pbstewart1960

Yes, when I do a 4:3 crop, for example, the width reduces from 5760 to 5120, and the 3rd (0-based index) int16u becomes 320 while the 4th remains 0.  This is consistent with a horizonally centered crop rectangle on the raw image.  PLEASE NOTE: I am seeing INT16U's, not int32u's, from my cameras.  If you'd like me to send you an example .CR2, I'd be happy to.

Thanks.

Phil Harvey

Sounds good, but I don't understand your comment about 16-bit ints because I have 5DmkIII samples which have 5 32-bit integers.  If you can mail this sample to me it would be helpful: philharvey66 at gmail.com.

Thanks.

- 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 ($).

pbstewart1960

My mistake.  I double-checked with a hex editor and they are int32u's.  Thanks.

Phil Harvey

OK, great.  Thanks.  I'll add the top/left tags in the next release.

- 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 ($).