How to modify the embedded JPG in a CR2

Started by rehuerta, January 08, 2018, 04:50:24 PM

Previous topic - Next topic

rehuerta

Can ExifTool be used to modified the embedded JPG in a CR2?

We are trying to use RawTherapee to do color/lighting corrections, but the images are auto-orienting incorrectly, and thus we hope that we can use the ExifTool to correct this error in the underlying metadata.

We used ExifTool to check the CR2's images' orientation using this command: exiftool -G1 -a -H -Orientation -CameraOrientation *.cr2, and it showed us that the CR2s were oriented correctly. Somebody elsewhere suggested that the issue might be a result of RawTherapee reading the embedded jpeg's orientation and applying it to the CR2. We understand that it is possible to use ExifTool to view the embedded jpeg's metadata, but the only documentation we have found is about extracting the embedded jpeg (something we don't need to do). So, how can we view the embedded jpeg's orientation information, and how can we modify it?

Included is a link to two of the images (in the "Inputs" subfolder).
https://drive.google.com/open?id=1Nw8yS1sWRi9O8wZyoVsMLDU_0__Y7xKf

Thanks!

Phil Harvey

You should be able to modify any writable embedded image.  The last PIPING EXAMPLE in the application documentation shows how to do this in a one-liner with the ThumbnailImage:

       exiftool a.jpg -thumbnailimage -b | exiftool -comment=wow - | exiftool a.jpg -thumbnailimage'<=-'
            Add a comment to an embedded thumbnail image.  (Why anyone would
            want to do this I don't know, but I've included this as an example
            to illustrate the flexibility of ExifTool.)


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