Recover malformed metadata containers, release 0.20.2

This commit is contained in:
Victor Kuznetsov
2026-07-28 12:12:26 -07:00
parent 1d333fe855
commit 59823b2eaf
9 changed files with 95 additions and 7 deletions
+4 -1
View File
@@ -119,7 +119,10 @@ if has_ai_metadata(source):
Use `strip_and_verify` when your application reports that stripping succeeded.
It checks the written output and returns `(output_path, surviving_markers)`.
Treat a nonempty `surviving_markers` mapping as a failure.
When the first strip leaves markers in a malformed but raster-decodable image,
it normalizes the container through `image_io` and checks again. That recovery
path preserves the pixels but drops standard metadata. Treat a nonempty
`surviving_markers` mapping as a failure.
`remove_ai_metadata` is the lower level fail-safe transformer. It may copy an
undecodable input through unchanged, so its return alone must not be presented