Skip to content

Adobe-written keyword metadata not found in PNG image #461

@markolbert

Description

@markolbert

When I process a PNG file created by Photoshop, in which I've embedded keywords using Adobe Bridge, the keyword metadata is not found.

I used ExifTool to confirm the metadata is, in fact, in the file. It's in a tag that ExifTool calls "Subject".

When I process the file with ImageSharp and extract the XmpProfile from the metadata it reads (via a call to GetDocument(), which returns the raw XML for the metadata), the keywords are included in a node labeled Subject:

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 9.1-c002 79.a1cd12f, 2024/11/11-19:08:46        ">
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" xmpMM:OriginalDocumentID="uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b" xmpMM:DocumentID="xmp.did:8D3E99D35BA78A42BA55E1CBC779AC01" xmpMM:InstanceID="xmp.iid:0727cbc4-3d33-124e-8c8b-fa693d90a208" xmp:CreatorTool="Adobe Photoshop 26.8 (Windows)" xmp:MetadataDate="2026-01-02T10:49:54-08:00" exif:ExifVersion="0231" exif:PixelXDimension="6037" exif:PixelYDimension="4749" exif:ColorSpace="1" tiff:Orientation="1" tiff:ImageWidth="6037" tiff:ImageLength="4749" tiff:PhotometricInterpretation="2" tiff:SamplesPerPixel="3" tiff:XResolution="600/1" tiff:YResolution="600/1" tiff:ResolutionUnit="2" dc:format="image/png" photoshop:ColorMode="3" photoshop:ICCProfile="sRGB IEC61966-2.1">
      <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:a7b7c5a2-e8ea-4a43-9f6a-1dcc92f3ed5d" stRef:documentID="adobe:docid:photoshop:be4ee987-67ea-3741-b9a0-9164f0e2b7e7" />
      <xmpMM:History>
        <rdf:Seq>
          <rdf:li stEvt:action="saved" stEvt:instanceID="xmp.iid:0727cbc4-3d33-124e-8c8b-fa693d90a208" stEvt:when="2026-01-02T10:49:54-08:00" stEvt:softwareAgent="Adobe Bridge 2026" stEvt:changed="/metadata" />
        </rdf:Seq>
      </xmpMM:History>
      <tiff:BitsPerSample>
        <rdf:Seq>
          <rdf:li>8</rdf:li>
          <rdf:li>8</rdf:li>
          <rdf:li>8</rdf:li>
        </rdf:Seq>
      </tiff:BitsPerSample>
      <dc:subject>
        <rdf:Bag>
          <rdf:li>farm</rdf:li>
        </rdf:Bag>
      </dc:subject>
    </rdf:Description>
  </rdf:RDF>
</x:xmpmeta>
<?xpacket end="r"?>

Is there a way to use MetadataExtractor to access this information? I'm guessing the comparable raw XML is available within the library, but not exposed publicly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions