Skip to content

Commit a8626f8

Browse files
hodoulpzhoub
andauthored
Write converted image with output colorspace (#1420) (#1500) (#1531)
* Write converted image with output colorspace (#1420) Signed-off-by: Bo Zhou <[email protected]> * Check if outputcolorspace is null and set it as oiio:ColorSpace (#1460) Signed-off-by: Bo Zhou <[email protected]> * Call getDisplayViewColorSpaceName to get output colorspace for view mode. #1420 Signed-off-by: Bo Zhou <[email protected]> Co-authored-by: Patrick Hodoul <[email protected]> Co-authored-by: Bo Zhou <[email protected]>
1 parent df74525 commit a8626f8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/apps/ocioconvert/main.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,17 @@ int main(int argc, const char **argv)
616616
exit(1);
617617
}
618618

619+
if (useDisplayView)
620+
{
621+
OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig();
622+
outputcolorspace = config->getDisplayViewColorSpaceName(display, view);
623+
}
624+
625+
if (outputcolorspace)
626+
{
627+
spec.attribute("oiio:ColorSpace", outputcolorspace);
628+
}
629+
619630
f->open(outputimage, spec);
620631

621632
if(!f->write_image(spec.format, img.getBuffer()))

0 commit comments

Comments
 (0)