mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
OP-4643 - changed oiio_cmd creation
Co-authored-by: Toke Jepsen <tokejepsen@gmail.com>
This commit is contained in:
parent
4b5c14e466
commit
756661f71b
1 changed files with 3 additions and 13 deletions
|
|
@ -1076,25 +1076,15 @@ def convert_colorspace(
|
|||
if logger is None:
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
input_arg = "-i"
|
||||
oiio_cmd = [
|
||||
get_oiio_tools_path(),
|
||||
|
||||
input_path,
|
||||
# Don't add any additional attributes
|
||||
"--nosoftwareattrib",
|
||||
"--colorconfig", config_path,
|
||||
"--colorconvert", source_colorspace, target_colorspace
|
||||
]
|
||||
# Prepare subprocess arguments
|
||||
|
||||
oiio_cmd.extend([
|
||||
input_arg, input_path,
|
||||
])
|
||||
|
||||
# Add last argument - path to output
|
||||
oiio_cmd.extend([
|
||||
"--colorconvert", source_colorspace, target_colorspace,
|
||||
"-o", out_filepath
|
||||
])
|
||||
]
|
||||
|
||||
logger.debug("Conversion command: {}".format(" ".join(oiio_cmd)))
|
||||
run_subprocess(oiio_cmd, logger=logger)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue