103 Returns the tone mapping algorithm used by this object.
105 The algorithm is defined at construction time and determines how
106 the input HDR image is converted into a displayable image.
109 The tone mapping algorithm identifier.
111 @since ids_peak_icv 1.2
113 algorithm = ctypes.c_int()
114 execute_and_map_return_codes(
115 lib_loader.dll().peak_icv_ToneMapping_GetAlgorithm,
117 ctypes.pointer(algorithm),
122 def algorithm(self, algorithm: ToneMappingAlgorithm) ->
None:
125 Sets the tone mapping algorithm.
128 The tone mapping algorithm to use.
130 @since ids_peak_icv 1.2
132 execute_and_map_return_codes(
133 lib_loader.dll().peak_icv_ToneMapping_SetAlgorithm,
135 ctypes.c_int(algorithm.value),
141 Applies tone mapping to an HDR image.
143 Processes the provided HDR image and converts it into a displayable
144 Low Dynamic Range (LDR) image using the tone mapping algorithm
145 associated with this object.
147 The input image must be compatible with the tone mapping configuration.
150 The HDR image to be tone mapped.
153 The resulting tone-mapped image.
155 @since ids_peak_icv 1.2
157 _check_icv_image(image)
160 output_pixel_format = ctypes.c_int()
161 execute_and_map_return_codes(
162 lib_loader.dll().peak_icv_ToneMapping_Process_GetOutputPixelFormat,
164 ctypes.c_int(image.pixel_format.value),
165 ctypes.pointer(output_pixel_format),
169 output_image = Image.create_from_pixel_format_and_size(
171 Size(image.width, image.height),
175 execute_and_map_return_codes(
176 lib_loader.dll().peak_icv_ToneMapping_Process,
179 output_image._handle,