Merge pull request #1594 from BigRoy/1593-yn-0303-thumbnail-and-review-colorspace-is-off

This commit is contained in:
Roy Nieterau 2025-12-10 10:47:20 +01:00 committed by GitHub
commit 31e6b5a139
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1234,17 +1234,11 @@ def oiio_color_convert(
if source_view and source_display:
color_convert_args = None
ocio_display_args = None
oiio_cmd.extend([
"--ociodisplay:inverse=1:subimages=0",
source_display,
source_view,
])
if target_colorspace:
# This is a two-step conversion process since there's no direct
# display/view to colorspace command
# This could be a config parameter or determined from OCIO config
# Use temporarty role space 'scene_linear'
# Use temporary role space 'scene_linear'
color_convert_args = ("scene_linear", target_colorspace)
elif source_display != target_display or source_view != target_view:
# Complete display/view pair conversion
@ -1256,6 +1250,15 @@ def oiio_color_convert(
" No color conversion needed."
)
if color_convert_args or ocio_display_args:
# Invert source display/view so that we can go from there to the
# target colorspace or display/view
oiio_cmd.extend([
"--ociodisplay:inverse=1:subimages=0",
source_display,
source_view,
])
if color_convert_args:
# Use colorconvert for colorspace target
oiio_cmd.extend([