MWG DateTimeOriginal error

Started by TSM, November 07, 2017, 07:24:26 AM

Previous topic - Next topic

TSM

I think there is a bug in the MWG formatter. Note you have put $val[3] which is 'IPTC:TimeCreated' but it should be $val[2] which is 'IPTC:DateCreated'.
Same may also apply to the CreateDate block but we do not use it for anything.

Noticed the issue after upgrading as we were using older version pre MWG updates and realised dates were not coming through the composite tags.
For the moment ive corrected issue in our custom -use MWG2 formatter.

Current

        RawConv => q{
            (defined $val[0] or defined $val[1] or defined $val[3] or
            (defined $val[4] and (not defined $val[5] or not defined $val[6]
            or $val[5] eq $val[6]))) ? $val : undef
        }


Expected

        RawConv => q{
            (defined $val[0] or defined $val[1] or defined $val[2] or
            (defined $val[4] and (not defined $val[5] or not defined $val[6]
            or $val[5] eq $val[6]))) ? $val : undef
        }



[{
  "SourceFile": "/Batch_01/55078587.jpg",
  "ExifTool": {
    "ExifToolVersion": 10.65
  },
  "File": {
    "FileName": "55078587.jpg",
    "Directory": "/Batch_01",
    "FileSize": "7.5 MB",
    "FileModifyDate": "2017:11:02 14:53:52+00:00",
    "FileAccessDate": "2017:11:02 14:53:47+00:00",
    "FileInodeChangeDate": "2017:11:07 10:43:52+00:00",
    "FilePermissions": "rw-rw-r--",
    "FileType": "JPEG",
    "FileTypeExtension": "jpg",
    "MIMEType": "image/jpeg",
    "ImageWidth": 4600,
    "ImageHeight": 3012,
    "EncodingProcess": "Baseline DCT, Huffman coding",
    "BitsPerSample": 8,
    "ColorComponents": 3,
    "YCbCrSubSampling": "YCbCr4:4:4 (1 1)",
    "CurrentIPTCDigest": "98f5519c6732c9cd69eeb4a4db263e00"
  },
  "XMP": {
    "XMPToolkit": "Adobe XMP Core 5.1.0-jc003",
    "City": "Doha",
    "TransmissionReference": "shp050",
    "Headline": "FC Bayern Munich - Training camp",
    "Credit": "picture alliance / dpa",
    "Source": "dpa",
    "CaptionWriter": "shp lof fvs",
    "Country": "Qatar",
    "CountryCode": "QAT",
    "Title": 55078587,
    "Subject": ["training",".soccer","sports","Sport",".Bundesliga","SPO",".training camp"],
    "Creator": "Sven Hoppe",
    "Rights": "usage worldwide",
    "Description": "Munich's player Manuel Neuer is seen after a training session in Doha, Qatar, 16 January 2015. Bayern Munich stays in Qatar until 17 January 2015 to prepare for the second half of the German Bundesliga season. Photo: Sven Hoppe/dpa | usage worldwide"
  },
  "JFIF": {
    "JFIFVersion": 1.01,
    "ResolutionUnit": "None",
    "XResolution": 240,
    "YResolution": 240
  },
  "IPTC": {
    "ApplicationRecordVersion": 2,
    "ObjectName": 55078587,
    "Category": "sp",
    "Keywords": ["training",".soccer","sports","Sport",".Bundesliga","SPO",".training camp"],
    "DateCreated": "2015:01:16",
    "By-line": "Sven Hoppe",
    "City": "Doha",
    "Country-PrimaryLocationCode": "QAT",
    "OriginalTransmissionReference": "shp050",
    "Headline": "FC Bayern Munich - Training camp",
    "Credit": "picture alliance / dpa",
    "Source": "dpa",
    "CopyrightNotice": "usage worldwide",
    "Caption-Abstract": "Munich's player Manuel Neuer is seen after a training session in Doha, Qatar, 16 January 2015. Bayern Munich stays in Qatar until 17 January 2015 to prepare for the second half of the German Bundesliga season. Photo: Sven Hoppe/dpa | usage worldwide",
    "Writer-Editor": "shp lof fvs",
    "Country-PrimaryLocationName": "Qatar"
  },
"Composite": {
    "City": "Doha",
    "Copyright": "usage worldwide",
    "Country": "Qatar",
    "Creator": "Sven Hoppe",
    "Description": "Munich's player Manuel Neuer is seen after a training session in Doha, Qatar, 16 January 2015. Bayern Munich stays in Qatar until 17 January 2015 to prepare for the second half of the German Bundesliga season. Photo: Sven Hoppe/dpa | usage worldwide",
    "ImageSize": "4600x3012",
    "Keywords": ["training",".soccer","sports","Sport",".Bundesliga","SPO",".training camp"],
    "Megapixels": 13.9
  }
}]

Phil Harvey

Nice catch, thanks!!  This patch will appear in version 10.66

The same fix applies to MWG:CreateDate.

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