ExifTool Forum

ExifTool => Developers => Topic started by: nagibator on July 16, 2018, 02:33:47 PM

Title: convert image from .cr2 to .jpeg via C++
Post by: nagibator on July 16, 2018, 02:33:47 PM
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. 
Title: Re: convert image from .cr2 to .jpeg via C++
Post by: StarGeek on July 16, 2018, 02:41:52 PM
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 (https://www.libraw.org/docs)?).
Title: Re: convert image from .cr2 to .jpeg via C++
Post by: Phil Harvey on July 16, 2018, 04:18:44 PM
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