Skip to content

Commit 3b29190

Browse files
committed
fix(exr): allow an empty "name" metadata to be read (AcademySoftwareFoundation#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]>
1 parent e09cb27 commit 3b29190

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openexr.imageio/exrinput.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ OpenEXRInput::PartInfo::parse_header(OpenEXRInput* in,
652652
}
653653

654654
// EXR "name" also gets passed along as "oiio:subimagename".
655-
if (header->hasName() && header->name() != "")
655+
if (header->hasName())
656656
spec.attribute("oiio:subimagename", header->name());
657657

658658
spec.attribute("oiio:subimages", in->m_nsubimages);

0 commit comments

Comments
 (0)