if os.path.split(aces_CTL_directory)[1] != 'utilities':
ctl_module_path = os.path.join(aces_CTL_directory, 'utilities')
else:
if os.path.split(aces_CTL_directory)[1] != 'utilities':
ctl_module_path = os.path.join(aces_CTL_directory, 'utilities')
else:
args += ['-input_scale', str(input_scale)]
args += ['-output_scale', str(output_scale)]
args += ['-global_param1', 'aIn', '1.0']
args += ['-input_scale', str(input_scale)]
args += ['-output_scale', str(output_scale)]
args += ['-global_param1', 'aIn', '1.0']
lut_path_base = os.path.splitext(lut_path)[0]
identity_LUT_image_float = '%s.%s.%s' % (lut_path_base, 'float', 'tiff')
lut_path_base = os.path.splitext(lut_path)[0]
identity_LUT_image_float = '%s.%s.%s' % (lut_path_base, 'float', 'tiff')
width = transformed_spec.width
height = transformed_spec.height
channels = transformed_spec.nchannels
width = transformed_spec.width
height = transformed_spec.height
channels = transformed_spec.nchannels
if width != lut_resolution * lut_resolution or height != lut_resolution:
print(('Correcting image as resolution is off. '
'Found %d x %d. Expected %d x %d') % (
if width != lut_resolution * lut_resolution or height != lut_resolution:
print(('Correcting image as resolution is off. '
'Found %d x %d. Expected %d x %d') % (
- #
- # We're going to generate a new correct image
- #
-
- # Get the source data
- # Force data to be read as float. The Python API doesn't handle
- # half-floats well yet.
+ # Forcibly read data as float, the Python API doesn't handle half-float
+ # well yet.
correct_spec = oiio.ImageSpec()
correct_spec.set_format(oiio.FLOAT)
correct_spec.width = height
correct_spec = oiio.ImageSpec()
correct_spec.set_format(oiio.FLOAT)
correct_spec.width = height
for j in range(0, correct_spec.height):
for i in range(0, correct_spec.width):
for c in range(0, correct_spec.nchannels):
for j in range(0, correct_spec.height):
for i in range(0, correct_spec.width):
for c in range(0, correct_spec.nchannels):
lut_path_base = os.path.splitext(lut_path)[0]
identity_LUT_image_float = '%s.%s.%s' % (lut_path_base, 'float', 'tiff')
lut_path_base = os.path.splitext(lut_path)[0]
identity_LUT_image_float = '%s.%s.%s' % (lut_path_base, 'float', 'tiff')
os.remove(transformed_LUT_image)
if corrected_LUT_image != transformed_LUT_image:
os.remove(corrected_LUT_image)
os.remove(transformed_LUT_image)
if corrected_LUT_image != transformed_LUT_image:
os.remove(corrected_LUT_image)