convert image from .cr2 to .jpeg via C++

Started by nagibator, July 16, 2018, 02:33:47 PM

Previous topic - Next topic

nagibator

Hi guys, sorry for maybe stupid question, but, how I can convert image from .cr2 to .jpeg using C++ Exiftool interface? I guess I should use Command() method and pass terminal's command, but I'm not sure if it's correct way. 

StarGeek

I'm sorry to say but you can't.  Exiftool only deals with metadata.  It doesn't affect image data at all and can't convert from one format to another.  You'll have to look for something else to do a conversion (LibRaw?).
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

You can extract the embedded JPEG images from CR2 files.  Their size is variable, but often they are full-sized.  Try this to extract all embedded images from CR2's in a directory:

exiftool -preview:all -b -W %d/%f_%e%c.%s -ext cr2 DIR

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