Skip to main content

OH_Image_GetComponent

Function OH_Image_GetComponent 

Source
pub unsafe extern "C" fn OH_Image_GetComponent(
    native: *const ImageNative,
    componentType: i32,
    componentNative: *mut OhosImageComponent,
) -> i32
Expand description

@brief Obtains {@link OhosImageComponent} of an {@link ImageNative} object at the native layer.

@param native Indicates the pointer to an {@link ImageNative} object at the native layer. @param componentType Indicates the type of the required component. @param componentNative Indicates the pointer to the {@link OhosImageComponent} object obtained. @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful. returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment. returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter. returns {@link IRNdkErrCode} IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED - if Failed to obtain parameters for surface. returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter. @see ImageNative, OhosImageComponent @since 10 @version 2.0