dlemstra / dlemstra/Magick.NET

Magick.NET is unable to read/write extended XMP data

Open
#324 5 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
C#
Stars
4k
Forks
451
Avg merge
11h 55m
Merged PRs (30d)
3

Description

I've hit a problem with XMP data where the data is stored as extended XMP segments. It looks like Image Magick/Magick.NET don't read or write extended XMP data correctly and this is preventing me from reading information from the XMP profile.

I've had a read of the XMP specification (link at the bottom of this). When XMP data in an image extends beyond 64Kb, the profile is supposed to be split in to one standard segment and one (or more) extended segments, each under 64Kb in size. Each segment is variable length, and the application that writes the data is responsible for the way in which the XMP data is split across different segments.

The specification says that extended segments should be written as follow:
"Each chunk is written into the JPEG file within a separate APP1 marker segment. Each ExtendedXMP marker segment contains:
- A null-terminated signature string of "http://ns.adobe.com/xmp/extension/".
- A 128-bit GUID stored as a 32-byte ASCII hex string, capital A-F, no null termination. The GUID is a 128-bit
- MD5 digest of the full ExtendedXMP serialization.
- The full length of the ExtendedXMP serialization as a 32-bit unsigned integer
- The offset of this portion as a 32-bit unsigned integer.
- The portion of the ExtendedXMP"

See XMP storage specification, section 1.1.3.1 (https://wwwimages2.adobe.com/content/dam/acom/en/devnet/xmp/pdfs/XMP%20SDK%20Release%20cc-2016-08/XMPSpecificationPart3.pdf)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.