Skip to content

Commit 8f5ae6d

Browse files
committed
fix(openexr): remove printing warning to stderr
Signed-off-by: glowies <self@oktaycomu.com>
1 parent 0b3967e commit 8f5ae6d

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/openexr.imageio/exroutput.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ process_aces_container(OIIO::ImageSpec& spec, std::string mode)
338338
bool is_compliant = is_aces_container_compliant(spec);
339339

340340
if (!is_compliant) {
341-
std::cerr << "WARNING: Image spec is not ACES Container compliant\n";
341+
// TODO: When we have a way to report warnings, report one here
342+
// to indicate that the given image spec is not compliant
342343

343344
// early out and return true iff in "relaxed" mode
344345
// to indicate that the output can continue without
@@ -884,9 +885,7 @@ OpenEXROutput::spec_to_header(ImageSpec& spec, int subimage,
884885
bool should_panic = !process_aces_container(spec, aces_mode);
885886

886887
if (should_panic) {
887-
const char* non_compliance_message
888-
= "Cannot output non-compliant ACES Container in 'strict' mode.";
889-
errorfmt(non_compliance_message);
888+
errorfmt("Cannot output non-compliant ACES Container in 'strict' mode.");
890889
return false;
891890
}
892891
}

testsuite/openexr-suite/ref/out.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,8 @@ negoverscan.exr : 64 x 64, 3 channel, half openexr
342342
oiio:subimages: 1
343343
openexr:lineOrder: "increasingY"
344344
1
345-
WARNING: Image spec is not ACES Container compliant
346345

347-
WARNING: Image spec is not ACES Container compliant
348346

349-
WARNING: Image spec is not ACES Container compliant
350347

351348
Reading strict-out.exr
352349
strict-out.exr : 4 x 4, 3 channel, half openexr
@@ -362,15 +359,12 @@ strict-out.exr : 4 x 4, 3 channel, half openexr
362359
oiio:subimages: 1
363360
openexr:ACESContainer: "strict"
364361
openexr:lineOrder: "increasingY"
365-
WARNING: Image spec is not ACES Container compliant
366362
oiiotool ERROR: -o : Cannot output non-compliant ACES Container in 'strict' mode.
367363
Full command line was:
368364
> oiiotool --create 4x4 3 -d half --compression none --ch R,G,B -sattrib openexr:ACESContainer strict -o strict-fail.exr
369-
WARNING: Image spec is not ACES Container compliant
370365
oiiotool ERROR: -o : Cannot output non-compliant ACES Container in 'strict' mode.
371366
Full command line was:
372367
> oiiotool --create 4x4 3 -d half --compression zip --ch B,G,R -sattrib openexr:ACESContainer strict -o strict-fail.exr
373-
WARNING: Image spec is not ACES Container compliant
374368
oiiotool ERROR: -o : Cannot output non-compliant ACES Container in 'strict' mode.
375369
Full command line was:
376370
> oiiotool --create 4x4 3 -d float --compression none --ch B,G,R -sattrib openexr:ACESContainer strict -o strict-fail.exr

0 commit comments

Comments
 (0)