Cannot find IPTC data in tiff

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
willferguson
Posts: 2
Joined: 2015-08-02T02:57:45-07:00
Authentication code: 1151

Cannot find IPTC data in tiff

Post by willferguson »

Hi All,

I'm trying to extract the IPTC data from this tiff image:
https://www.dropbox.com/s/e3pefo37ppqo9rr/test.tif?dl=0

I'm running:

Code: Select all

convert test.tif test.iptc
but I get an empty test.iptc file and the following output:

Code: Select all

convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/856.
convert: Unknown field with tag 34864 (0x8830) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/856.
convert: Unknown field with tag 34866 (0x8832) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/856.
convert: Unknown field with tag 42033 (0xa431) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/856.
convert: Unknown field with tag 42034 (0xa432) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/856.
convert: Unknown field with tag 42036 (0xa434) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/856.
convert: Unknown field with tag 42037 (0xa435) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/856.
convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/856.
convert: no IPTC profile available `test.iptc' @ error/meta.c/WriteMETAImage/2280.
I can see IPTC data there with exiv2.

This was tested on Ubuntu 15.04 with ImageMagick 6.9.1-10 Q16 x86_64 2015-07-30. LibTiff 4.0.3.

Any idea what's going wrong?

Thanks in advance.
Will
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Cannot find IPTC data in tiff

Post by fmw42 »

I do not see IPTC data with IM 6.9.1.10 Q16 Mac OSX using:

Code: Select all

identify -verbose test.tif
IM's meta tag reading is somewhat limited. I tried using EXIF, but I only see

1061 IPTCDigest : c9fc75338947cda1c23d39e31f19fe95

So I guess all the information you want may be contained in that digest, which perhaps IM does not load. Or perhaps the digest is empty. But see the IPTC section at http://www.imagemagick.org/script/escape.php.

For now you may be better off using your exiv2.

One of the IM developer will need to explore your file to see if IM supports reading whatever data you want.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Cannot find IPTC data in tiff

Post by magick »

Here is what tiffinfo reports-- no IPTC info:

Code: Select all

TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored.
TIFF Directory at offset 0x8 (8)
  Subfile Type: (0 = 0x0)
  Image Width: 3543 Image Length: 2362
  Resolution: 300, 300 pixels/inch
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3
  Rows/Strip: 2362
  Planar Configuration: single image plane
  Make: Canon
  Model: Canon EOS 5D Mark III
  Software: Adobe Photoshop CS6 (Macintosh)
  DateTime: 2015:07:31 09:13:24
  XMLPacket (XMP Metadata):
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        ">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:xmp="http://ns.adobe.com/xap/1.0/">
         <xmp:ModifyDate>2015-07-31T09:13:24+01:00</xmp:ModifyDate>
         <xmp:CreateDate>2013-09-07T06:45:12</xmp:CreateDate>
         <xmp:Label>Approved</xmp:Label>
         <xmp:MetadataDate>2015-07-31T09:13:24+01:00</xmp:MetadataDate>
         <xmp:CreatorTool>Adobe Photoshop Lightroom 5.7.1 (Macintosh)</xmp:CreatorTool>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:dc="http://purl.org/dc/elements/1.1/">
         <dc:format>image/tiff</dc:format>
         <dc:rights>
            <rdf:Alt>
               <rdf:li xml:lang="x-default">JET2HOLIDAYS</rdf:li>
            </rdf:Alt>
         </dc:rights>
         <dc:subject>
            <rdf:Bag>
               <rdf:li>DLM_Dalaman</rdf:li>
               <rdf:li>Dalyan</rdf:li>
               <rdf:li>Europe</rdf:li>
               <rdf:li>Geographic Keywords</rdf:li>
               <rdf:li>Image Source</rdf:li>
               <rdf:li>Jet2.com_Keywords</rdf:li>
               <rdf:li>Photographer - Gavin Priestley</rdf:li>
               <rdf:li>Turkey</rdf:li>
            </rdf:Bag>
         </dc:subject>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:aux="http://ns.adobe.com/exif/1.0/aux/">
         <aux:SerialNumber>083024003204</aux:SerialNumber>
         <aux:LensInfo>70/1 200/1 0/0 0/0</aux:LensInfo>
         <aux:Lens>EF70-200mm f/2.8L USM</aux:Lens>
         <aux:LensID>165</aux:LensID>
         <aux:LensSerialNumber>0000000000</aux:LensSerialNumber>
         <aux:ImageNumber>0</aux:ImageNumber>
         <aux:ApproximateFocusDistance>4294967295/1</aux:ApproximateFocusDistance>
         <aux:FlashCompensation>0/1</aux:FlashCompensation>
         <aux:Firmware>1.1.3</aux:Firmware>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
         <photoshop:DateCreated>2013-09-07T06:45:12</photoshop:DateCreated>
         <photoshop:ColorMode>3</photoshop:ColorMode>
         <photoshop:ICCProfile>ProPhoto RGB</photoshop:ICCProfile>
         <photoshop:TextLayers>
            <rdf:Bag>
               <rdf:li rdf:parseType="Resource">
                  <photoshop:LayerName>TEST IMAGE</photoshop:LayerName>
                  <photoshop:LayerText>TEST IMAGE</photoshop:LayerText>
               </rdf:li>
            </rdf:Bag>
         </photoshop:TextLayers>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
            xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
            xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#">
         <xmpMM:DocumentID>xmp.did:2e7bb35d-370a-4f05-9048-1d321cd382ba</xmpMM:DocumentID>
         <xmpMM:OriginalDocumentID>673822150D016102114826AFB2324DF7</xmpMM:OriginalDocumentID>
         <xmpMM:InstanceID>xmp.iid:078011740720681180839CAA8DCE086F</xmpMM:InstanceID>
         <xmpMM:History>
            <rdf:Seq>
               <rdf:li rdf:parseType="Resource">
                  <stEvt:action>derived</stEvt:action>
                  <stEvt:parameters>converted from image/x-canon-cr2 to image/tiff, saved to new location</stEvt:parameters>
               </rdf:li>
               <rdf:li rdf:parseType="Resource">
                  <stEvt:action>saved</stEvt:action>
                  <stEvt:instanceID>xmp.iid:2e7bb35d-370a-4f05-9048-1d321cd382ba</stEvt:instanceID>
                  <stEvt:when>2015-01-16T10:12:24Z</stEvt:when>
                  <stEvt:softwareAgent>Adobe Photoshop Lightroom 5.7.1 (Macintosh)</stEvt:softwareAgent>
                  <stEvt:changed>/</stEvt:changed>
               </rdf:li>
               <rdf:li rdf:parseType="Resource">
                  <stEvt:action>saved</stEvt:action>
                  <stEvt:instanceID>xmp.iid:4b983802-5b1b-4814-ab1c-67427a04d15e</stEvt:instanceID>
                  <stEvt:when>2015-01-27T22:31:25Z</stEvt:when>
                  <stEvt:softwareAgent>Adobe Photoshop Camera Raw 8.7</stEvt:softwareAgent>
                  <stEvt:changed>/metadata</stEvt:changed>
               </rdf:li>
               <rdf:li rdf:parseType="Resource">
                  <stEvt:action>saved</stEvt:action>
                  <stEvt:instanceID>xmp.iid:11308455-15db-4655-9fee-6536ae4821ba</stEvt:instanceID>
                  <stEvt:when>2015-01-27T22:31:25Z</stEvt:when>
                  <stEvt:softwareAgent>Adobe Photoshop Camera Raw 8.7.1 (Macintosh)</stEvt:softwareAgent>
                  <stEvt:changed>/metadata</stEvt:changed>
               </rdf:li>
               <rdf:li rdf:parseType="Resource">
                  <stEvt:action>saved</stEvt:action>
                  <stEvt:instanceID>xmp.iid:068011740720681180839CAA8DCE086F</stEvt:instanceID>
                  <stEvt:when>2015-07-31T09:13:24+01:00</stEvt:when>
                  <stEvt:softwareAgent>Adobe Photoshop CS6 (Macintosh)</stEvt:softwareAgent>
                  <stEvt:changed>/</stEvt:changed>
               </rdf:li>
               <rdf:li rdf:parseType="Resource">
                  <stEvt:action>saved</stEvt:action>
                  <stEvt:instanceID>xmp.iid:078011740720681180839CAA8DCE086F</stEvt:instanceID>
                  <stEvt:when>2015-07-31T09:13:24+01:00</stEvt:when>
                  <stEvt:softwareAgent>Adobe Photoshop CS6 (Macintosh)</stEvt:softwareAgent>
                  <stEvt:changed>/</stEvt:changed>
               </rdf:li>
            </rdf:Seq>
         </xmpMM:History>
         <xmpMM:DerivedFrom rdf:parseType="Resource">
            <stRef:documentID>673822150D016102114826AFB2324DF7</stRef:documentID>
            <stRef:originalDocumentID>673822150D016102114826AFB2324DF7</stRef:originalDocumentID>
         </xmpMM:DerivedFrom>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/">
         <crs:Version>8.7.1</crs:Version>
         <crs:ProcessVersion>6.7</crs:ProcessVersion>
         <crs:WhiteBalance>Daylight</crs:WhiteBalance>
         <crs:AutoWhiteVersion>134348800</crs:AutoWhiteVersion>
         <crs:Temperature>5500</crs:Temperature>
         <crs:Tint>+10</crs:Tint>
         <crs:Saturation>0</crs:Saturation>
         <crs:Sharpness>52</crs:Sharpness>
         <crs:LuminanceSmoothing>12</crs:LuminanceSmoothing>
         <crs:ColorNoiseReduction>25</crs:ColorNoiseReduction>
         <crs:VignetteAmount>0</crs:VignetteAmount>
         <crs:ShadowTint>0</crs:ShadowTint>
         <crs:RedHue>0</crs:RedHue>
         <crs:RedSaturation>0</crs:RedSaturation>
         <crs:GreenHue>0</crs:GreenHue>
         <crs:GreenSaturation>0</crs:GreenSaturation>
         <crs:BlueHue>0</crs:BlueHue>
         <crs:BlueSaturation>0</crs:BlueSaturation>
         <crs:Vibrance>+31</crs:Vibrance>
         <crs:HueAdjustmentRed>0</crs:HueAdjustmentRed>
         <crs:HueAdjustmentOrange>0</crs:HueAdjustmentOrange>
         <crs:HueAdjustmentYellow>0</crs:HueAdjustmentYellow>
         <crs:HueAdjustmentGreen>0</crs:HueAdjustmentGreen>
         <crs:HueAdjustmentAqua>0</crs:HueAdjustmentAqua>
         <crs:HueAdjustmentBlue>0</crs:HueAdjustmentBlue>
         <crs:HueAdjustmentPurple>0</crs:HueAdjustmentPurple>
         <crs:HueAdjustmentMagenta>0</crs:HueAdjustmentMagenta>
         <crs:SaturationAdjustmentRed>0</crs:SaturationAdjustmentRed>
         <crs:SaturationAdjustmentOrange>0</crs:SaturationAdjustmentOrange>
         <crs:SaturationAdjustmentYellow>0</crs:SaturationAdjustmentYellow>
         <crs:SaturationAdjustmentGreen>0</crs:SaturationAdjustmentGreen>
         <crs:SaturationAdjustmentAqua>0</crs:SaturationAdjustmentAqua>
         <crs:SaturationAdjustmentBlue>0</crs:SaturationAdjustmentBlue>
         <crs:SaturationAdjustmentPurple>0</crs:SaturationAdjustmentPurple>
         <crs:SaturationAdjustmentMagenta>0</crs:SaturationAdjustmentMagenta>
         <crs:LuminanceAdjustmentRed>0</crs:LuminanceAdjustmentRed>
         <crs:LuminanceAdjustmentOrange>0</crs:LuminanceAdjustmentOrange>
         <crs:LuminanceAdjustmentYellow>0</crs:LuminanceAdjustmentYellow>
         <crs:LuminanceAdjustmentGreen>0</crs:LuminanceAdjustmentGreen>
         <crs:LuminanceAdjustmentAqua>0</crs:LuminanceAdjustmentAqua>
         <crs:LuminanceAdjustmentBlue>0</crs:LuminanceAdjustmentBlue>
         <crs:LuminanceAdjustmentPurple>0</crs:LuminanceAdjustmentPurple>
         <crs:LuminanceAdjustmentMagenta>0</crs:LuminanceAdjustmentMagenta>
         <crs:SplitToningShadowHue>0</crs:SplitToningShadowHue>
         <crs:SplitToningShadowSaturation>0</crs:SplitToningShadowSaturation>
         <crs:SplitToningHighlightHue>0</crs:SplitToningHighlightHue>
         <crs:SplitToningHighlightSaturation>0</crs:SplitToningHighlightSaturation>
         <crs:SplitToningBalance>0</crs:SplitToningBalance>
         <crs:ParametricShadows>0</crs:ParametricShadows>
         <crs:ParametricDarks>0</crs:ParametricDarks>
         <crs:ParametricLights>0</crs:ParametricLights>
         <crs:ParametricHighlights>0</crs:ParametricHighlights>
         <crs:ParametricShadowSplit>25</crs:ParametricShadowSplit>
         <crs:ParametricMidtoneSplit>50</crs:ParametricMidtoneSplit>
         <crs:ParametricHighlightSplit>75</crs:ParametricHighlightSplit>
         <crs:SharpenRadius>+1.0</crs:SharpenRadius>
         <crs:SharpenDetail>25</crs:SharpenDetail>
         <crs:SharpenEdgeMasking>0</crs:SharpenEdgeMasking>
         <crs:PostCropVignetteAmount>0</crs:PostCropVignetteAmount>
         <crs:GrainAmount>0</crs:GrainAmount>
         <crs:LuminanceNoiseReductionDetail>50</crs:LuminanceNoiseReductionDetail>
         <crs:ColorNoiseReductionDetail>50</crs:ColorNoiseReductionDetail>
         <crs:LuminanceNoiseReductionContrast>0</crs:LuminanceNoiseReductionContrast>
         <crs:ColorNoiseReductionSmoothness>50</crs:ColorNoiseReductionSmoothness>
         <crs:LensProfileEnable>1</crs:LensProfileEnable>
         <crs:LensManualDistortionAmount>0</crs:LensManualDistortionAmount>
         <crs:PerspectiveVertical>0</crs:PerspectiveVertical>
         <crs:PerspectiveHorizontal>0</crs:PerspectiveHorizontal>
         <crs:PerspectiveRotate>0.0</crs:PerspectiveRotate>
         <crs:PerspectiveScale>100</crs:PerspectiveScale>
         <crs:PerspectiveAspect>0</crs:PerspectiveAspect>
         <crs:PerspectiveUpright>0</crs:PerspectiveUpright>
         <crs:AutoLateralCA>1</crs:AutoLateralCA>
         <crs:Exposure2012>+0.40</crs:Exposure2012>
         <crs:Contrast2012>-6</crs:Contrast2012>
         <crs:Highlights2012>0</crs:Highlights2012>
         <crs:Shadows2012>0</crs:Shadows2012>
         <crs:Whites2012>+28</crs:Whites2012>
         <crs:Blacks2012>-23</crs:Blacks2012>
         <crs:Clarity2012>0</crs:Clarity2012>
         <crs:DefringePurpleAmount>0</crs:DefringePurpleAmount>
         <crs:DefringePurpleHueLo>30</crs:DefringePurpleHueLo>
         <crs:DefringePurpleHueHi>70</crs:DefringePurpleHueHi>
         <crs:DefringeGreenAmount>0</crs:DefringeGreenAmount>
         <crs:DefringeGreenHueLo>40</crs:DefringeGreenHueLo>
         <crs:DefringeGreenHueHi>60</crs:DefringeGreenHueHi>
         <crs:ConvertToGrayscale>False</crs:ConvertToGrayscale>
         <crs:ToneCurveName>Linear</crs:ToneCurveName>
         <crs:ToneCurveName2012>Linear</crs:ToneCurveName2012>
         <crs:CameraProfile>Adobe Standard</crs:CameraProfile>
         <crs:LensProfileSetup>LensDefaults</crs:LensProfileSetup>
         <crs:LensProfileName>Adobe (Canon EF 70-200mm f/2.8 L USM)</crs:LensProfileName>
         <crs:LensProfileFilename>Canon EOS-1Ds Mark III (Canon EF 70-200mm f2.8 L USM) - RAW.lcp</crs:LensProfileFilename>
         <crs:LensProfileDigest>83B5486B9162547AF685863FEAD8716E</crs:LensProfileDigest>
         <crs:LensProfileDistortionScale>100</crs:LensProfileDistortionScale>
         <crs:LensProfileChromaticAberrationScale>100</crs:LensProfileChromaticAberrationScale>
         <crs:LensProfileVignettingScale>100</crs:LensProfileVignettingScale>
         <crs:HasSettings>True</crs:HasSettings>
         <crs:CropTop>0.097662</crs:CropTop>
         <crs:CropLeft>0.048831</crs:CropLeft>
         <crs:CropBottom>1</crs:CropBottom>
         <crs:CropRight>0.951169</crs:CropRight>
         <crs:CropAngle>0</crs:CropAngle>
         <crs:CropConstrainToWarp>0</crs:CropConstrainToWarp>
         <crs:HasCrop>True</crs:HasCrop>
         <crs:AlreadyApplied>True</crs:AlreadyApplied>
         <crs:ToneCurve>
            <rdf:Seq>
               <rdf:li>0, 0</rdf:li>
               <rdf:li>255, 255</rdf:li>
            </rdf:Seq>
         </crs:ToneCurve>
         <crs:ToneCurveRed>
            <rdf:Seq>
               <rdf:li>0, 0</rdf:li>
               <rdf:li>255, 255</rdf:li>
            </rdf:Seq>
         </crs:ToneCurveRed>
         <crs:ToneCurveGreen>
            <rdf:Seq>
               <rdf:li>0, 0</rdf:li>
               <rdf:li>255, 255</rdf:li>
            </rdf:Seq>
         </crs:ToneCurveGreen>
         <crs:ToneCurveBlue>
            <rdf:Seq>
               <rdf:li>0, 0</rdf:li>
               <rdf:li>255, 255</rdf:li>
            </rdf:Seq>
         </crs:ToneCurveBlue>
         <crs:ToneCurvePV2012>
            <rdf:Seq>
               <rdf:li>0, 0</rdf:li>
               <rdf:li>255, 255</rdf:li>
            </rdf:Seq>
         </crs:ToneCurvePV2012>
         <crs:ToneCurvePV2012Red>
            <rdf:Seq>
               <rdf:li>0, 0</rdf:li>
               <rdf:li>255, 255</rdf:li>
            </rdf:Seq>
         </crs:ToneCurvePV2012Red>
         <crs:ToneCurvePV2012Green>
            <rdf:Seq>
               <rdf:li>0, 0</rdf:li>
               <rdf:li>255, 255</rdf:li>
            </rdf:Seq>
         </crs:ToneCurvePV2012Green>
         <crs:ToneCurvePV2012Blue>
            <rdf:Seq>
               <rdf:li>0, 0</rdf:li>
               <rdf:li>255, 255</rdf:li>
            </rdf:Seq>
         </crs:ToneCurvePV2012Blue>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:lr="http://ns.adobe.com/lightroom/1.0/">
         <lr:hierarchicalSubject>
            <rdf:Bag>
               <rdf:li>Jet2.com_Keywords|Geographic Keywords|Europe</rdf:li>
               <rdf:li>Jet2.com_Keywords|Geographic Keywords|Europe|Turkey</rdf:li>
               <rdf:li>Jet2.com_Keywords|Geographic Keywords|Europe|Turkey|DLM_Dalaman</rdf:li>
               <rdf:li>Jet2.com_Keywords|Geographic Keywords|Europe|Turkey|DLM_Dalaman|Dalyan</rdf:li>
               <rdf:li>Jet2.com_Keywords|Image Source|Photographer - Gavin Priestley</rdf:li>
            </rdf:Bag>
         </lr:hierarchicalSubject>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
  Copyright: JET2HOLIDAYS
  Photoshop Data: <present>, 6946 bytes
  EXIFIFDOffset: 0x17fa024
  ICC Profile: <present>, 940 bytes
TIFFReadCustomDirectory: Warning, Unknown field with tag 34864 (0x8830) encountered.
TIFFReadCustomDirectory: Warning, Unknown field with tag 34866 (0x8832) encountered.
TIFFReadCustomDirectory: Warning, Unknown field with tag 42033 (0xa431) encountered.
TIFFReadCustomDirectory: Warning, Unknown field with tag 42034 (0xa432) encountered.
TIFFReadCustomDirectory: Warning, Unknown field with tag 42036 (0xa434) encountered.
TIFFReadCustomDirectory: Warning, Unknown field with tag 42037 (0xa435) encountered.
TIFF Directory at offset 0x17fa024 (25141284)
  ExposureTime: 0.002500
  FNumber: 7.100000
  ExposureProgram: 3
  ISOSpeedRatings: 100
  Tag 34864: 2
  Tag 34866: 100
  ExifVersion: 0x30,0x32,0x33,0x30
  DateTimeOriginal: 2013:09:07 06:45:12
  DateTimeDigitized: 2013:09:07 06:45:12
  ShutterSpeedValue: 8.643856
  ApertureValue: 5.655638
  ExposureBiasValue: 0.333333
  MaxApertureValue: 3.000000
  MeteringMode: 5
  Flash: 16
  FocalLength: 200.000000
  ColorSpace: 65535
  PixelXDimension: 3543
  PixelYDimension: 2362
  FocalPlaneXResolution: 1600.000000
  FocalPlaneYResolution: 1600.000000
  FocalPlaneResolutionUnit: 3
  CustomRendered: 0
  ExposureMode: 0
  WhiteBalance: 0
  SceneCaptureType: 0
  Tag 42033: 083024003204
  Tag 42034: 70.000000,200.000000,0.000000,0.000000
  Tag 42036: EF70-200mm f/2.8L USM
  Tag 42037: 0000000000
and ImageMagick captures most of this metadata with 'identify -verbose':

Code: Select all

Image: test.tif
  Format: TIFF (Tagged Image File Format)
  Mime type: image/tiff
  Class: DirectClass
  Geometry: 3543x2362+0+0
  Resolution: 300x300
  Print size: 11.81x7.87333
  Units: PixelsPerInch
  Type: Palette
  Base type: TrueColor
  Endianess: LSB
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Pixels: 8368566
    Red:
      min: 59 (0.231373)
      max: 235 (0.921569)
      mean: 60.6309 (0.237768)
      standard deviation: 16.7489 (0.0656819)
      kurtosis: 103.248
      skewness: 10.2441
      entropy: 0.0205196
    Green:
      min: 89 (0.34902)
      max: 239 (0.937255)
      mean: 90.3893 (0.354468)
      standard deviation: 14.2711 (0.0559651)
      kurtosis: 103.319
      skewness: 10.2476
      entropy: 0.0205196
    Blue:
      min: 152 (0.596078)
      max: 247 (0.968627)
      mean: 152.879 (0.599526)
      standard deviation: 9.03552 (0.0354334)
      kurtosis: 103.408
      skewness: 10.252
      entropy: 0.0205196
  Image statistics:
    Overall:
      min: 59 (0.231373)
      max: 247 (0.968627)
      mean: 101.3 (0.397254)
      standard deviation: 13.7335 (0.053857)
      kurtosis: 184.134
      skewness: 16.199
      entropy: 0.0205196
  Colors: 17
  Histogram:
   8288223: ( 59, 89,152) #3B5998 srgb(59,89,152)
       324: ( 72,100,158) #48649E srgb(72,100,158)
       207: ( 85,110,165) #556EA5 srgb(85,110,165)
       181: ( 97,120,171) #6178AB srgb(97,120,171)
      1376: (109,130,177) #6D82B1 srgb(109,130,177)
       158: (121,140,183) #798CB7 srgb(121,140,183)
       219: (132,150,189) #8496BD srgb(132,150,189)
       131: (143,159,195) #8F9FC3 srgb(143,159,195)
      1016: (153,168,201) #99A8C9 srgb(153,168,201)
       149: (164,177,207) #A4B1CF srgb(164,177,207)
       200: (175,186,212) #AFBAD4 srgb(175,186,212)
       144: (185,195,218) #B9C3DA srgb(185,195,218)
       766: (195,204,224) #C3CCE0 srgb(195,204,224)
       206: (205,213,230) #CDD5E6 srgb(205,213,230)
       211: (215,222,236) #D7DEEC srgb(215,222,236)
       274: (225,230,241) #E1E6F1 srgb(225,230,241)
     74781: (235,239,247) #EBEFF7 srgb(235,239,247)
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 3543x2362+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: None
  Orientation: TopLeft
  Properties:
    aux:ApproximateFocusDistance: 4294967295/1
    aux:Firmware: 1.1.3
    aux:FlashCompensation: 0/1
    aux:ImageNumber: 0
    aux:Lens: EF70-200mm f/2.8L USM
    aux:LensID: 165
    aux:LensInfo: 70/1 200/1 0/0 0/0
    aux:LensSerialNumber: 0000000000
    aux:SerialNumber: 083024003204
    crs:AlreadyApplied: True
    crs:AutoLateralCA: 1
    crs:AutoWhiteVersion: 134348800
    crs:Blacks2012: -23
    crs:BlueHue: 0
    crs:BlueSaturation: 0
    crs:CameraProfile: Adobe Standard
    crs:Clarity2012: 0
    crs:ColorNoiseReduction: 25
    crs:ColorNoiseReductionDetail: 50
    crs:ColorNoiseReductionSmoothness: 50
    crs:Contrast2012: -6
    crs:ConvertToGrayscale: False
    crs:CropAngle: 0
    crs:CropBottom: 1
    crs:CropConstrainToWarp: 0
    crs:CropLeft: 0.048831
    crs:CropRight: 0.951169
    crs:CropTop: 0.097662
    crs:DefringeGreenAmount: 0
    crs:DefringeGreenHueHi: 60
    crs:DefringeGreenHueLo: 40
    crs:DefringePurpleAmount: 0
    crs:DefringePurpleHueHi: 70
    crs:DefringePurpleHueLo: 30
    crs:Exposure2012: +0.40
    crs:GrainAmount: 0
    crs:GreenHue: 0
    crs:GreenSaturation: 0
    crs:HasCrop: True
    crs:HasSettings: True
    crs:Highlights2012: 0
    crs:HueAdjustmentAqua: 0
    crs:HueAdjustmentBlue: 0
    crs:HueAdjustmentGreen: 0
    crs:HueAdjustmentMagenta: 0
    crs:HueAdjustmentOrange: 0
    crs:HueAdjustmentPurple: 0
    crs:HueAdjustmentRed: 0
    crs:HueAdjustmentYellow: 0
    crs:LensManualDistortionAmount: 0
    crs:LensProfileChromaticAberrationScale: 100
    crs:LensProfileDigest: 83B5486B9162547AF685863FEAD8716E
    crs:LensProfileDistortionScale: 100
    crs:LensProfileEnable: 1
    crs:LensProfileFilename: Canon EOS-1Ds Mark III (Canon EF 70-200mm f2.8 L USM) - RAW.lcp
    crs:LensProfileName: Adobe (Canon EF 70-200mm f/2.8 L USM)
    crs:LensProfileSetup: LensDefaults
    crs:LensProfileVignettingScale: 100
    crs:LuminanceAdjustmentAqua: 0
    crs:LuminanceAdjustmentBlue: 0
    crs:LuminanceAdjustmentGreen: 0
    crs:LuminanceAdjustmentMagenta: 0
    crs:LuminanceAdjustmentOrange: 0
    crs:LuminanceAdjustmentPurple: 0
    crs:LuminanceAdjustmentRed: 0
    crs:LuminanceAdjustmentYellow: 0
    crs:LuminanceNoiseReductionContrast: 0
    crs:LuminanceNoiseReductionDetail: 50
    crs:LuminanceSmoothing: 12
    crs:ParametricDarks: 0
    crs:ParametricHighlights: 0
    crs:ParametricHighlightSplit: 75
    crs:ParametricLights: 0
    crs:ParametricMidtoneSplit: 50
    crs:ParametricShadows: 0
    crs:ParametricShadowSplit: 25
    crs:PerspectiveAspect: 0
    crs:PerspectiveHorizontal: 0
    crs:PerspectiveRotate: 0.0
    crs:PerspectiveScale: 100
    crs:PerspectiveUpright: 0
    crs:PerspectiveVertical: 0
    crs:PostCropVignetteAmount: 0
    crs:ProcessVersion: 6.7
    crs:RedHue: 0
    crs:RedSaturation: 0
    crs:Saturation: 0
    crs:SaturationAdjustmentAqua: 0
    crs:SaturationAdjustmentBlue: 0
    crs:SaturationAdjustmentGreen: 0
    crs:SaturationAdjustmentMagenta: 0
    crs:SaturationAdjustmentOrange: 0
    crs:SaturationAdjustmentPurple: 0
    crs:SaturationAdjustmentRed: 0
    crs:SaturationAdjustmentYellow: 0
    crs:Shadows2012: 0
    crs:ShadowTint: 0
    crs:SharpenDetail: 25
    crs:SharpenEdgeMasking: 0
    crs:SharpenRadius: +1.0
    crs:Sharpness: 52
    crs:SplitToningBalance: 0
    crs:SplitToningHighlightHue: 0
    crs:SplitToningHighlightSaturation: 0
    crs:SplitToningShadowHue: 0
    crs:SplitToningShadowSaturation: 0
    crs:Temperature: 5500
    crs:Tint: +10
    crs:ToneCurveName: Linear
    crs:ToneCurveName2012: Linear
    crs:Version: 8.7.1
    crs:Vibrance: +31
    crs:VignetteAmount: 0
    crs:WhiteBalance: Daylight
    crs:Whites2012: +28
    date:create: 2015-08-02T15:17:53-04:00
    date:modify: 2015-08-02T15:17:53-04:00
    dc:format: image/tiff
    exif:ApertureValue: 5.65564
    exif:CustomRendered: 0
    exif:DateTimeDigitized: 2013:09:07 06:45:12
    exif:DateTimeOriginal: 2013:09:07 06:45:12
    exif:ExposureBiasValue: 0.333333
    exif:ExposureMode: 0
    exif:ExposureProgram: 3
    exif:ExposureTime: 0.0025
    exif:Flash: 16
    exif:FNumber: 7.1
    exif:FocalLength: 200
    exif:FocalPlaneResolutionUnit: 3
    exif:FocalPlaneXResolution: 1600
    exif:FocalPlaneYResolution: 1600
    exif:ISOSpeedRatings: 100
    exif:MaxApertureValue: 3
    exif:MeteringMode: 5
    exif:PixelXDimension: 3543
    exif:PixelYDimension: 2362
    exif:SceneCaptureType: 0
    exif:ShutterSpeedValue: 8.64386
    exif:WhiteBalance: 0
    icc:copyright: Copyright (c) Eastman Kodak Company, 1999, all rights reserved.
    icc:description: ProPhoto RGB
    icc:manufacturer: KODAK
    icc:model: Reference Output Medium Metric(ROMM)  
    photoshop:ColorMode: 3
    photoshop:DateCreated: 2013-09-07T06:45:12
    photoshop:ICCProfile: ProPhoto RGB
    signature: f8d91d3cf52a3322ae138af8c123be7b8405e01b053786a2fee34434c91f5e1d
    stRef:documentID: 673822150D016102114826AFB2324DF7
    stRef:originalDocumentID: 673822150D016102114826AFB2324DF7
    tiff:alpha: unspecified
    tiff:copyright: JET2HOLIDAYS
    tiff:endian: lsb
    tiff:make: Canon
    tiff:model: Canon EOS 5D Mark III
    tiff:photometric: RGB
    tiff:rows-per-strip: 1
    tiff:software: Adobe Photoshop CS6 (Macintosh)
    tiff:timestamp: 2015:07:31 09:13:24
    xmp:CreateDate: 2013-09-07T06:45:12
    xmp:CreatorTool: Adobe Photoshop Lightroom 5.7.1 (Macintosh)
    xmp:Label: Approved
    xmp:MetadataDate: 2015-07-31T09:13:24+01:00
    xmp:ModifyDate: 2015-07-31T09:13:24+01:00
    xmpMM:DocumentID: xmp.did:2e7bb35d-370a-4f05-9048-1d321cd382ba
    xmpMM:InstanceID: xmp.iid:078011740720681180839CAA8DCE086F
    xmpMM:OriginalDocumentID: 673822150D016102114826AFB2324DF7
  Profiles:
    Profile-8bim: 6946 bytes
    Profile-icc: 940 bytes
    Profile-xmp: 27037 bytes
  Artifacts:
    filename: test.tif
    verbose: true
  Tainted: False
  Filesize: 25.14MB
  Number pixels: 8.369M
  Pixels per second: 2.09214TB
  User time: 0.000u
  Elapsed time: 0:01.000
  Version: ImageMagick 6.9.2-0 Q16 x86_64 2015-08-02 http://www.imagemagick.org
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/878.
identify: Unknown field with tag 34864 (0x8830) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/878.
identify: Unknown field with tag 34866 (0x8832) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/878.
identify: Unknown field with tag 42033 (0xa431) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/878.
identify: Unknown field with tag 42034 (0xa432) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/878.
identify: Unknown field with tag 42036 (0xa434) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/878.
identify: Unknown field with tag 42037 (0xa435) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/878.
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/878.
246246
Posts: 190
Joined: 2015-07-06T07:38:22-07:00
Authentication code: 1151

Re: Cannot find IPTC data in tiff

Post by 246246 »

The IPTC data you are looking via exif2

Code: Select all

$ exiv2 -pi test.tif
Iptc.Envelope.CharacterSet                   String      3
Iptc.Application2.RecordVersion              Short       1  4
Iptc.Application2.DateCreated                Date        8  2013-09-07
Iptc.Application2.TimeCreated                Time       11  06:45:12+00:00
Iptc.Application2.DigitizationDate           Date        8  2013-09-07
Iptc.Application2.Keywords                   String     11  DLM_Dalaman
Iptc.Application2.Keywords                   String      6  Dalyan
Iptc.Application2.Keywords                   String      6  Europe
Iptc.Application2.Keywords                   String     19  Geographic Keywords
Iptc.Application2.Keywords                   String     12  Image Source
Iptc.Application2.Keywords                   String     17  Jet2.com_Keywords
Iptc.Application2.Keywords                   String     30  Photographer - Gavin Priestley
Iptc.Application2.Keywords                   String      6  Turkey
Iptc.Application2.Copyright                  String     12  JET2HOLIDAYS
is stored in Tiff Tag 33723 (0x83bb)

Code: Select all

$ exiv2 -pS test.tif
STRUCTURE OF TIFF FILE (II): test.tif
 address |    tag                           |      type |    count |   offset | value
      10 | 0x00fe NewSubfileType            |      LONG |        1 |        0 | 0
      22 | 0x0100 ImageWidth                |     SHORT |        1 |     3543 | 3543
      34 | 0x0101 ImageLength               |     SHORT |        1 |     2362 | 2362
      46 | 0x0102 BitsPerSample             |     SHORT |        3 |      314 | 8 8 8
      58 | 0x0103 Compression               |     SHORT |        1 |        1 | 1
      70 | 0x0106 PhotometricInterpretation |     SHORT |        1 |        2 | 2
      82 | 0x010f Make                      |     ASCII |        6 |      320 | Canon
      94 | 0x0110 Model                     |     ASCII |       22 |      326 | Canon EOS 5D Mark III
     106 | 0x0111 StripOffsets              |      LONG |        1 |    35584 | 35584
     118 | 0x0112 Orientation               |     SHORT |        1 |        1 | 1
     130 | 0x0115 SamplesPerPixel           |     SHORT |        1 |        3 | 3
     142 | 0x0116 RowsPerStrip              |     SHORT |        1 |     2362 | 2362
     154 | 0x0117 StripByteCounts           |      LONG |        1 | 25105698 | 25105698
     166 | 0x011a XResolution               |  RATIONAL |        1 |      348 | 348/0
     178 | 0x011b YResolution               |  RATIONAL |        1 |      356 | 356/0
     190 | 0x011c PlanarConfiguration       |     SHORT |        1 |        1 | 1
     202 | 0x0128 ResolutionUnit            |     SHORT |        1 |        2 | 2
     214 | 0x0131 Software                  |     ASCII |       32 |      364 | Adobe Photoshop CS6 (Macintosh)
     226 | 0x0132 DateTime                  |     ASCII |       20 |      396 | 2015:07:31 09:13:24
     238 | 0x02bc XMLPacket                 |      BYTE |    27037 |      416 | <?xpacket begin="..." id="W5M0Mp ...
     250 | 0x8298 Copyright                 |     ASCII |       13 |    27454 | JET2HOLIDAYS
     262 | 0x83bb IPTCNAA                   | UNDEFINED |      229 |    27468 |  ...
     274 | 0x8649 ImageResources            |      BYTE |     6946 |    27698 | 8BIM.%........u3.G...=9.....8BIM ...
     286 | 0x8769 ExifTag                   |      LONG |        1 | 25141284 | 25141284
     298 | 0x8773 InterColorProfile         | UNDEFINED |      940 |    34644 |  ...
I think you already know you can extract it by getting 229 byte from offset 27468. The problem is that
traditionally libtiff only deal with long data for that tag, and in your tiff, this type is undefined.
See the discussion in TIFF and LibTiff Mailing List starting with http://www.asmail.be/msg0055372993.html
That's why you see this warining:
convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/856.

If it were saved as long, it could be seen via ImageMagick.

I happen to find good example file here: http://metadatadeluxe.pbworks.com/w/pag ... Properties
Check 33723 tag for those TIFF files.

Code: Select all

$ for i in Exif_only.tif IPTC_IIM_only.tif XMP_IPTC_Core_only.tif XMP_IPTC_Ext_only.tif; do echo $i; tiffdump $i | grep '^33723'; done
Exif_only.tif
IPTC_IIM_only.tif
33723 (0x83bb) LONG (4) 89<540 470024194 318768386 1129599049 1296648480 1784827693 1316250469 476409185 285219074 1129599049 1296648480 2036681517 1685221239 1342315635 1346965504 1226851156 1110265161 1768697209 35415406 1226113109 541283408 760039753 1814919490 1415933545 ...>
XMP_IPTC_Core_only.tif
XMP_IPTC_Ext_only.tif
33723 (0x83bb) UNDEFINED (7) 15<0x1c 0x1 0x5a 00 0x3 0x1b 0x25 0x47 0x1c 0x2 00 00 0x2 00 0x4>
So current ImageMagick cannot retrieve IPTC data from "XMP_IPTC_Ext_only.tif", but can retrieve from "IPTC_IIM_only.tif".

Code: Select all

$ identify -verbose XMP_IPTC_Ext_only.tif | grep -i IPTC
Image: XMP_IPTC_Ext_only.tif
    filename: XMP_IPTC_Ext_only.tif
identify: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/856.

Code: Select all

$ identify -verbose IPTC_IIM_only.tif | grep -i IPTC
Image: IPTC_IIM_only.tif
    Profile-iptc: 356 bytes
      Image Name[2,5]: IPTC IIM-ObjectName
      Keyword[2,25]: IPTC IIM-Keywords
      Byline[2,80]: IPTC IIM-By-line
      Byline Title[2,85]: IPTC IIM-By-lineTitle
      City[2,90]: IPTC IIM-City
      Sub-Location[2,92]: IPTC IIM-Sub-Location
      Province State[2,95]: IPTC IIM-Province-State
      Country[2,101]: IPTC IIM-Country
      Headline[2,105]: IPTC IIM-Headline
      Copyright String[2,116]: IPTC IIM-CopyrightNotice
      Caption[2,120]: IPTC IIM-Caption-Abstract
      Caption Writer[2,122]: IPTC IIM-Writer-Editor
    filename: IPTC_IIM_only.tif
willferguson
Posts: 2
Joined: 2015-08-02T02:57:45-07:00
Authentication code: 1151

Re: Cannot find IPTC data in tiff

Post by willferguson »

Thanks all for very useful information.
Much appreciated.
Post Reply