ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:03 AM

Title: Metadata changes when copying from JPG to MIE
Post by: Archive on May 12, 2010, 08:54:03 AM
[Originally posted by bugmenot on 2007-04-15 17:15:51-07]

Hi Phil & all,

I've come across some odd behaviour using exiftool to backup all the metadata in my images to MIE files.  If I take an image from an Olympus C-3030Z (just happened to be the first one I found) and do this:

Code:
$ exiftool -tagsFromFile test1.jpg -all:all test1.mie

There are a couple of unexpected differences in the output file (I'm diffing the output of "exiftool -a -G1 -s" to see what changed).

- The YCbCrPositioning tag has changed from "Co-Sited" in the JPG file to "Centered" in the MIE.

- The InteropIFD group isn't copied at all.

If I copy the MIE data back into the original JPG, YCbCrPositioning doesn't change (it stays correctly set to "Co-Sited"), but if I copy the MIE into a JPG with all the metadata stripped out, it does end up with YCbCrPositioning = "Centered".

I don't know if this is expected or not, or if it happens with any other tags, or if there's a more sensible way to back up all the metadata from an image.

This is all with exiftool 6.76 - apologies if this has changed in a later version, but I couldn't see anything relevant in the change log.

The files mentioned above are here.

Cheers,

    Scott
Title: Re: Metadata changes when copying from JPG to MIE
Post by: Archive on May 12, 2010, 08:54:03 AM
[Originally posted by exiftool on 2007-04-15 18:24:27-07]

Hi Scott,

Yes, this is expected.  These tags are all considered "unsafe"
to copy by default since they may change they way an image is
rendered.  And since the YCbCrPositioning tag is mandatory by
the specification, ExifTool uses a default value for this tag
since it wasn't copied from the image.  In the
Tag
Name documentation
, unsafe tags have an exclamation
point after the format name in the Writable column.

Unsafe tags must be specified explicitly if you want to copy them
from the source image.  ie)

Code:
exiftool -tagsfromfile test1.jpg -all:all -all:ycbcrpositioning -all:interopindex \
          -all:interopversion -o test1.mie

(note that I used the "all:" group on these tags to preserve the
locations of these tags as you are doing with the others.)

I realize this is a bit of a pain, but the alternative of
potentially harming destination images is far worse.

- Phil
Title: Re: Metadata changes when copying from JPG to MIE
Post by: Archive on May 12, 2010, 08:54:03 AM
[Originally posted by bugmenot on 2007-04-18 21:39:56-07]

Hi Phil,

As always the answer is obvious once you've explained it Smiley

Many thanks,

Scott