Conversation
Keep namespace bindings on mixed descriptions when stripping gain-map properties so retained descendants do not acquire unbound prefixes. Continue removing descriptions containing only gain-map metadata. Add a regression and retain existing property-removal coverage. Focused tests pass in dual-metadata and ISO-only builds; independent XML parsing validates the reproduced output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a shared XMP description contains gain-map properties and other metadata, stripping can remove a namespace declaration that a retained child still uses. The resulting XMP has an unbound prefix and is no longer valid XML.
Keep namespace declarations on shared descriptions while removing the gain-map properties. Descriptions containing only gain-map metadata are still removed in full. This avoids having to scan retained subtrees to decide which declarations they need.
Adds a regression for a retained child using an inherited namespace and updates the shared-description test to check property removal instead of requiring namespace declarations to disappear.
Validation: the new regression fails before this change. All 14 focused tests pass with ISO and XMP output enabled, and all 9 pass with ISO-only output. Independent XML parsing also succeeds for the reproduced public-API case.
Also checked the regression XMP in a copy of a real Pixel JPEG through the public stripping API: the retained XMP parses correctly, the gain-map Version property is removed, and the primary compressed scan and decoded pixels are unchanged.