I'm not interested at converting it, but extracting the thumbnail JPEG.
Asked
Active
Viewed 2,076 times
-1
-
What is the camera model? – xenoid Aug 06 '19 at 08:12
2 Answers
0
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...
twalberg
- 5,138
- 1
- 12
- 20
-
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. – S M Aug 05 '19 at 21:14
-
@SM The first three results that come up when I Google "exiv2 for Windows" all appear to have available downloads for Windows... – twalberg Aug 06 '19 at 00:36
-
That should be
-PreviewImage(uppercase P), but I think the OP wants-ThumbnailImageanyway. – xenoid Aug 06 '19 at 08:22 -
AFAIK the CR2 is mostly a TIFF and this overall structure doesn't change between camera models. Unless the OP means "CR3". – xenoid Aug 06 '19 at 08:29
-
@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... – twalberg Aug 06 '19 at 11:01
-
exiv2 has pre-built binaries for Windows available. The MSVC just refers to the compiler used. But inside the archive you'll find a
exiv2.execommand line tool. e.g.: https://www.exiv2.org/releases/exiv2-0.27.1-msvc64.zip – L. Scott Johnson Aug 06 '19 at 11:48 -
@twalberg Tweaks to the Canon-specific payload are likely, but arbitrary changes to standard fields much less so. – xenoid Aug 06 '19 at 12:43
-
@xenoid ExifTool is case insensitive, so any variation of
previewimagewould work if an image were stored in the relevant tag. So, as you note,ThumbnailImageis probably what OP needs. If that doesn't work, examine ExifTool output for "binary" to find the tag where the image is stored. – xiota Aug 07 '19 at 02:27