tagsFromFile and IPTC:ImageType Incorrect

Started by cocteau, March 27, 2015, 08:02:50 AM

Previous topic - Next topic

cocteau

exiftool.exe -v2 -m -tagsFromFile "SOURCE.XMP" -MetadataDate=now -o "TARGET.JPG" "SOURCE.JPG"

Setting new values from SOURCE.XMP
Sorry, XMP-x:XMPToolkit is unsafe for writing
Sorry, XMP:XMP is unsafe for writing
Sorry, CanonVRD:XMP is unsafe for writing
Writing PhotoMechanic:Rating if tag exists
Writing Sony:Rating if tag exists
Writing FujiFilm:Rating if tag exists
Writing XMP-acdsee:Rating if tag exists
Writing XMP-dex:Rating if tag exists
Writing XMP-xmp:Rating
Writing IFD0:Rating if tag exists
Writing IPTC:ImageType
Sorry, File:FileName is unsafe for writing
Sorry, File:FileModifyDate is unsafe for writing
Sorry, File:FileCreateDate is unsafe for writing
Sorry, File:Directory is unsafe for writing
Writing XMP-xmp:MetadataDate
======== SOURCE.JPG
'SOURCE.JPG' --> 'TARGET.JPG'
Rewriting SOURCE.JPG...
  Editing tags in: APP0 APP1 APP13 CIFF ExifIFD IFD0 IPTC JFIF MakerNotes PhotoMechanic Photoshop XMP
  Creating tags in: APP1 APP13 IPTC Photoshop XMP
JPEG APP1 (28426 bytes):
  Rewriting IFD0
  ExifByteOrder = MM
  Rewriting ExifIFD
  Rewriting GPS
Creating APP13:
  Creating Photoshop
  Creating IPTC
    + IPTC:ImageType = 'XMP'
    + IPTC:ApplicationRecordVersion = '4' (mandatory)
Creating APP1:
  Creating XMP
    + XMP-xmp:MetadataDate = '2015-03-27T12:42:00+01:00'
    + XMP-xmp:Rating = '3'
JPEG DQT (130 bytes):
JPEG SOF0:
JPEG DHT (416 bytes):
JPEG APP15 (1 bytes):
JPEG APP15 (30 bytes):
JPEG SOS
    1 image files created

Incorrect : IPTC:ImageType = 'XMP'

Please, do not auto write "IPTC:ImageType" from tagsFromFile.

Workaround:
exiftool.exe -v2 -m -tagsFromFile "SOURCE.XMP" -MetadataDate=now -ImageType= -o "TARGET.JPG" "SOURCE.JPG"

Phil Harvey

The only solution to this would be to make IPTC:ImageType unsafe.  But this would cause a problem for someone who wants to copy all of the IPTC.  I think a work-around like yours may be the best solution.

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

cocteau

Thanks for your answer...

But there is no IPTC tags, either in XMP or JPEG. This tag creates Exiftool automatically.

Exiftool recognizes the type of -tagsFromFile (XMP, TIFF, ... ) and generates IPTC:ImageType, even if it is never declared.

Phil Harvey

This tag must exist in the -tagsFromFile file or ExifTool wouldn't write it.  Since it can't write EXIF:ImageType, ExifTool tries IPTC:ImageType next since you didn't specify a destination group for the copy.

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

Marsu42

Quote from: Phil Harvey on March 27, 2015, 07:43:07 PMExifTool tries IPTC:ImageType next

Sorry for being ot, but what exactly is IPTC:ImageType anyway? The exiftool spec doesn't say anything other than string[2], and exiv2 isn't much more helpful as in "Indicates the color components of an image" (http://exiv2.org/iptc.html)

Quote from: Phil Harvey on March 27, 2015, 07:43:07 PMsince you didn't specify a destination group for the copy.

To the op: To prevent something like unintentional tag mixing, I find it most useful to explicitly specify the exact tag location everywhere, even if it seems a bit over the top at first and adds some more text to the command line.

Phil Harvey

Quote from: Marsu42 on April 10, 2015, 02:46:26 AM
what exactly is IPTC:ImageType anyway? The exiftool spec doesn't say anything other than string[2]

The ExifTool tag name documentation links to the standards document which provides all of the available details about these tags.

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