Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21296

MetadadaMapping fails to extract IPTC Keywords

    XMLWordPrintable

    Details

      Description

      Given the image attached to this ticket, extraction of the IPTC:Keywords metadata in the iptc:keywords field fails.

      1/ Assuming you have deployed nuxeo-dam and added the explicitely added the iptc schema to Picture.

      2/ Add this MatadateMapping and Rules to your configuration:

      <extension target="org.nuxeo.binary.metadata" point="metadataMappings">
        <metadataMapping id="pictureIPTC" processor="exifTool" blobXPath="file:content" ignorePrefix="true">
          <metadata name="Keywords" xpath="iptc:keywords" />
        </metadataMapping>
      </extension>
      
      <extension target="org.nuxeo.binary.metadata" point="metadataRules">
        <rule id="apply-on-picture-1" order="0" enabled="true" async="false">
          <metadataMappings>
            <metadataMapping-id>pictureIPTC</metadataMapping-id>
          </metadataMappings>
          <filters>
            <filter-id>isPicture</filter-id>
          </filters>
        </rule>
      </extension>
      
      <extension target="org.nuxeo.ecm.platform.actions.ActionService" point="filters">
        <filter id="isPicture">
          <rule grant="true">
            <type>Picture</type>
          </rule>
        </filter>
      </extension>
      

      3/ Deploy, run and import the image (I drag-dropped it)

      4/ Keywords can't be imported:

      [org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl] Failed to set property 'iptc:keywords' to value ["White Background, Coffee Break, Clipping Path, Photography, Nobody, Coffee Cup, China, Teaspoon, Copy Space, Single Object, Remote, Handle, Ceramics, Scented, Espresso, Refreshment, Freshness, Simplicity, Concepts, Full, Macro, Close-up, High Angle View, Man Made Object, Food, Hot Drink, Drink, Mug, Cup, Isolated, Isolated On White, Nero, Food And Drink, Concepts And Ideas, Isolated Objects, Objects with Clipping Paths"] from metadata 'Keywords' in 'file:content' in document 'null' ('/default-domain/workspaces/ws/15667414.jpg')
       
      

      Calling exiftool -m -G -json on the picture returns:

      . . .
      "IPTC:Keywords": ["\"White Background","Coffee Break","Clipping Path","Photography","Nobody","Coffee Cup","China","Teaspoon","Copy Space","Single Object","Remote","Handle","Ceramics","Scented","Espresso","Refreshment","Freshness","Simplicity","Concepts","Full","Macro","Close-up","High Angle View","Man Made Object","Food","Hot Drink","Drink","Mug","Cup","Isolated","Isolated On White","Nero","Food And Drink","Concepts And Ideas","Isolated Objects","Objects with Clipping Paths\""]
      . . .
      

        Attachments

          Activity

            People

            • Votes:
              4 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: