ExifTool Forum

ExifTool => Newbies => Topic started by: rjlittlefield on July 23, 2014, 08:35:40 PM

Title: How to do a split-phase version of -tagsFromFile ?
Post by: rjlittlefield on July 23, 2014, 08:35:40 PM
I'm working on an image processing application that needs to copy almost all available tags from one image file to another.  The file formats may vary, for example JPEG in but TIFF out, or vice versa. 

In experiments so far, it looks like this command will do exactly what I want:
exiftool -tagsFromFile infile.ext -all:all --all:icc_profile --all:colorspace outfile.ext

However, it would be great if I could split the copy into two phases: extract all the tags from infile.ext at one time, then at some later time store the tags into outfile.ext even if infile.ext is no longer available.

I experimented with using
exiftool -args infile.ext -all:all -g > alltags
but that didn't handle the binary information.

Then I tried
exiftool -args infile.ext -all:all -g -b > alltags
but that produced a result that I couldn't figure out how to interpret.

Is there some way to do a split-phase copy similar to -tagsFromFile, and if so, how?

Thanks!
--Rik
Title: Re: How to do a split-phase version of -tagsFromFile ?
Post by: Phil Harvey on July 24, 2014, 07:57:07 AM
Hi Rik,

Yes, the -args option is not compatible with -b.

There are a number of intermediate formats that support binary data.  From the -b documentation:

            May be combined with "-j", "-php" or "-X" to extract binary data
            in JSON, PHP or XML format.

I recommend the XML format since you can use -tagsFromFile with it as you wanted.

- Phil
Title: Re: How to do a split-phase version of -tagsFromFile ?
Post by: rjlittlefield on July 24, 2014, 10:04:39 AM
Phil, many thanks -- that looks like it will work great!

--Rik