-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(exr): allow an empty "name" metadata to be read #4528
Conversation
When the exr "name" metadata (used for the names of subimages/parts) existed but was the empty string, we were treating it like it didn't exist (and upon write substituted our own "subimageXY" name, as we are wont to do for unnamed parts). But now we've seen multi-part exrs where the name is "" (exists, but empty string) and we want a read-write cycle to preserve that. Even though it's not a very sensible or helpful part name, it's technically legal, so we should honor it. Signed-off-by: Larry Gritz <[email protected]>
Does anybody object to this? In short, the change allows multi-part exr files to have a part whose name is the empty string "", which is technically allowed by OpenEXR itself. Our old behavior was to treat an empty string part name as if there was no name at all (in which case we substituted something else). |
N.B. I always say "does anybody object" but what I really mean is "somebody PLEASE review and approve (or critique) this, because it's bad open source practice to merge PRs with no approval by somebody who isn't the author of the patch and I don't want to do that except in cases of real emergencies." |
…oundation#4528) When the exr "name" metadata (used for the names of subimages/parts) existed but was the empty string, we were treating it like it didn't exist (and upon write substituted our own "subimageXY" name, as we are wont to do for unnamed parts). But now we've seen multi-part exrs where the name is "" (exists, but empty string) and we want a read-write cycle to preserve that. Even though it's not a very sensible or helpful part name, it's technically legal, so we should honor it. Signed-off-by: Larry Gritz <[email protected]>
For what it's worth, in the OpenEXR subset documented in SMPTE's ACES Container (ST 2065-4:2023 ACES Image Container File Layout) zero-length attributes are everywhere -- unless we missed a spot -- disallowed. Point of information only. As for the change itself, LGTM |
…oundation#4528) When the exr "name" metadata (used for the names of subimages/parts) existed but was the empty string, we were treating it like it didn't exist (and upon write substituted our own "subimageXY" name, as we are wont to do for unnamed parts). But now we've seen multi-part exrs where the name is "" (exists, but empty string) and we want a read-write cycle to preserve that. Even though it's not a very sensible or helpful part name, it's technically legal, so we should honor it. Signed-off-by: Larry Gritz <[email protected]>
Continuation of PR AcademySoftwareFoundation#4528. I forgot to change the spot in the OpenEXR "core" API as well.
Continuation of PR AcademySoftwareFoundation#4528. I forgot to change the spot in the OpenEXR "core" API as well.
Continuation of PR AcademySoftwareFoundation#4528. I forgot to change the spot in the OpenEXR "core" API as well. Signed-off-by: Larry Gritz <[email protected]>
Continuation of PR AcademySoftwareFoundation#4528. I forgot to change the spot in the OpenEXR "core" API as well. Signed-off-by: Larry Gritz <[email protected]>
…oundation#4536) Continuation of PR AcademySoftwareFoundation#4528. I forgot to change the spot in the OpenEXR "core" API as well. Signed-off-by: Larry Gritz <[email protected]>
Continuation of PR #4528. I forgot to change the spot in the OpenEXR "core" API as well. Signed-off-by: Larry Gritz <[email protected]>
…oundation#4536) Continuation of PR AcademySoftwareFoundation#4528. I forgot to change the spot in the OpenEXR "core" API as well. Signed-off-by: Larry Gritz <[email protected]>
When the exr "name" metadata (used for the names of subimages/parts) existed but was the empty string, we were treating it like it didn't exist (and upon write substituted our own "subimageXY" name, as we are wont to do for unnamed parts). But now we've seen multi-part exrs where the name is "" (exists, but empty string) and we want a read-write cycle to preserve that. Even though it's not a very sensible or helpful part name, it's technically legal, so we should honor it.