Skip to content

PNG: Stricter XMP detection#3004

Merged
Shnatsel merged 1 commit into
image-rs:mainfrom
RunDevelopment:png-xmp-lit
May 30, 2026
Merged

PNG: Stricter XMP detection#3004
Shnatsel merged 1 commit into
image-rs:mainfrom
RunDevelopment:png-xmp-lit

Conversation

@RunDevelopment
Copy link
Copy Markdown
Member

Addresses L43 from #2954.

I think literal equality should be correct here, because the PNG spec says that keyword should be comparably by equality and because of Wikipedia.

Copy link
Copy Markdown
Member

@Shnatsel Shnatsel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec does clearly state that you should perform an exact match, not a substring search.

I checked for mentions of software that writes non-standard XMP names, and only imagemagick came up that writes it to Raw profile type xmp or Raw profile type XMP depending on the version (and also to a zTXt chunk instead of iTXt, and does other cursed stuff with it).

So this should not regress compatibility in any way.

@Shnatsel Shnatsel merged commit 60552f6 into image-rs:main May 30, 2026
31 checks passed
@RunDevelopment RunDevelopment deleted the png-xmp-lit branch May 30, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants