Skip to main content

OH_ImageProcessing_EnhanceDetail

Function OH_ImageProcessing_EnhanceDetail 

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

Clarity enhancement for images.

The function generate the destinationImage from sourceImage with necessary scaling operation according to the size preset in the sourceImage and destinationImage. Different levels of scaling methonds are provided to balance performance and image quality.

§Arguments

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

  • sourceImage - Input image 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