I'm not interested at converting it, but extracting the thumbnail JPEG.
2 Answers
\$\begingroup\$
\$\endgroup\$
8
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...
-
\$\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 MCommented 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\$– twalbergCommented Aug 6, 2019 at 0:36
-
\$\begingroup\$ That should be
-PreviewImage
(uppercase P), but I think the OP wants-ThumbnailImage
anyway. \$\endgroup\$– xenoidCommented 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\$– xenoidCommented 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\$– twalbergCommented Aug 6, 2019 at 11:01