Skip to main content

OH_ImageProcessing_Compose

Function OH_ImageProcessing_Compose 

Source
pub unsafe extern "C" fn OH_ImageProcessing_Compose(
    imageProcessor: *mut OH_ImageProcessing,
    sourceImage: *mut OH_PixelmapNative,
    sourceGainmap: *mut OH_PixelmapNative,
    destinationImage: *mut OH_PixelmapNative,
) -> ImageProcessing_ErrorCode
Available on crate features api-13 and image-processing only.
Expand description

Composition from dual-layer HDR images to single-layer HDR images.

The function generate the destinationImage from sourceImage and sourceGainmap.

§Arguments

  • imageProcessor - An image processing instance pointer. The instance should be created with type [IMAGE_PROCESSING_TYPE_COMPOSITION].

  • sourceImage - Input image pointer.

  • sourceGainmap - Input gainmap pointer.

  • destinationImage - Output image pointer.

§Returns

  • [IMAGE_PROCESSING_SUCCESS] if processing image is successful.

[IMAGE_PROCESSING_ERROR_INVALID_INSTANCE] if instance is null or not an image processing instance.

[IMAGE_PROCESSING_ERROR_INVALID_PARAMETER] if the image is null.

[IMAGE_PROCESSING_ERROR_INVALID_VALUE] if some property of image is invalid. For example, the color space of the image is unsupported.

[IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING] if the processing is not supported.

[IMAGE_PROCESSING_ERROR_PROCESS_FAILED] if processing error occurs.

[IMAGE_PROCESSING_ERROR_NO_MEMORY] if memory allocation failed.

Available since API-level: 13