extracting JPEG image from 400D's CR2 raw

Started by Archive, May 12, 2010, 08:54:39 AM

Previous topic - Next topic

Archive

[Originally posted by rawshooter on 2009-08-23 21:09:59-07]

Hello,

I have problems using exiftool to extract the JPEG image from a CR2 file obtained while shooting

RAW with a EOS 400D camera. More specifically, it does not extract anything, that is:

$ exiftool -b -jpgfromraw IMG_6194.CR2 > a.jpg # successfully creates an empty file

$ echo $?

0

$ ls --size a.jpg

0 a.jpg

I am able to extract the thumbnail and the previewimage from the same CR2 file,but not the actual JPG file.
 I've noticed that exiftool reports the image width and height, but these seems to be the ones for the preview(1936x1288).
The real ones are reported as "Canon Image Width"(3888) and "Canon Image Height" (2592).

Some version information:

eos 400d:

- 1.1.0 firmware version.

exiftool:

$ exiftool -ver

7.89

$

operating system version:

$ lsb_release -a

No LSB modules are available.

Distributor ID:   Ubuntu

Description:   Ubuntu 9.04

Release:   9.04

Codename:   jaunty

I can also provide CR2 files from my camera should anybody need to analyze them.

So,using exiftool, is there any way to extract the jpeg data from Canon CR2 files created by a 400D?

Thank you,

Cristian

Archive

[Originally posted by exiftool on 2009-08-23 23:24:17-07]

Hi Cristian,

ExifTool extracts all JPEG's from the 400D CR2 image.  There
is no full-resolution JPEG available, so the best you can do
is the PreviewImage.  Due to the way the CR2 is structured,
the image size that gets reported is for this preview.  The
raw image size is available through ExifImageWidth
and ExifImageHeight as well as the Canon tags you mentioned.

If Canon wrote the image dimensions in the RAW IFD and
marked this IFD as the full-resolution image, then exiftool
would extract the dimensions you expected.  From my point
of view there is a trade off between giving users what they
expect and introducing yet another patch to my TIFF code
to deal with the non-standard practices of the various
manufacturers.

- Phil