Skip to main content

OH_ImageProcessing_Decompose

Function OH_ImageProcessing_Decompose 

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

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

The function generate the destinationImage and destinationGainmap from sourceImage.

§Arguments

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

  • sourceImage - Input image pointer.

  • destinationImage - Output image pointer.

  • destinationGainmap - Output gainmap 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