-1
\$\begingroup\$

I'm not interested at converting it, but extracting the thumbnail JPEG.

\$\endgroup\$
1
  • \$\begingroup\$ What is the camera model? \$\endgroup\$
    – xenoid
    Commented Aug 6, 2019 at 8:12

2 Answers 2

0
\$\begingroup\$

Using either exiftool or exiv2.

For example:

exiftool -b -previewImage -w .jpg foo.cr2

or:

exiv2 -ep foo.cr2

If either tool is complaining about an invalid CR2 file, it's possible you have a newer camera and need a newer version of the tool. Canon does occasionally make tweaks to raw file formats that software needs to catch up on...

\$\endgroup\$
8
  • \$\begingroup\$ exiftool says what the rest of them are saying "invalid file" which is not i can open them with photoshop and i can see the jpeg with XNview and other programs and exiv2 has no version for Microsoft windows. It has a version for Microsoft visual studio but i haven't a clue how to use that. \$\endgroup\$
    – S M
    Commented Aug 5, 2019 at 21:14
  • \$\begingroup\$ @SM The first three results that come up when I Google "exiv2 for Windows" all appear to have available downloads for Windows... \$\endgroup\$
    – twalberg
    Commented Aug 6, 2019 at 0:36
  • \$\begingroup\$ That should be -PreviewImage (uppercase P), but I think the OP wants -ThumbnailImage anyway. \$\endgroup\$
    – xenoid
    Commented Aug 6, 2019 at 8:22
  • \$\begingroup\$ AFAIK the CR2 is mostly a TIFF and this overall structure doesn't change between camera models. Unless the OP means "CR3". \$\endgroup\$
    – xenoid
    Commented Aug 6, 2019 at 8:29
  • \$\begingroup\$ @xenoid Yes, the TIFF structure itself doesn't change, but the contents and format of the payload of one or more of the sections within the container may occasionally be tweaked. And some software is more sensitive to that than others, if it's looking for specific things that either moved, or changed format... \$\endgroup\$
    – twalberg
    Commented Aug 6, 2019 at 11:01
0
\$\begingroup\$

Try dcraw. dcraw -e will extract the thumbnail.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.