Direct Image Metadata Copy

Started by anddrrw, July 22, 2016, 09:18:47 AM

Previous topic - Next topic

anddrrw

Hi, first post here!

I'm trying to make a direct transfer of metadata tags and their values from one image to another. Based on this post, I've tried
exiftool -TagsFromFile srcimage.jpg "-all:all>all:all" targetimage.jpg

but some tags seem to change from one to the other (one being YCbCrPositioning changing from Co-sited in the source to Centered in the target). I think it's probably extracting that info from the JPG encoding, but I don't really want that - I directly want the values from the other image. Is there a way to specify this?

Thanks!

Phil Harvey

Hi Andrew,

The YCbCrPositioning isn't copied by default.  It is a protected tag because it could possibly affect the rendering of the image.

You should also copy the -unsafe tags if you also want to copy the common protected tags.  See "Unsafe" in the shortcuts documentation for a list of these tags.

The command will be:

exiftool -tagsfromfile srcimage.jpg -all:all -unsafe targetimage.jpg

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

anddrrw

Beautiful! I was not aware of the -unsafe option. That is also good to know in general - I was not aware exif data could effect the image rendering.

Thanks Phil!