Skip to main content

OH_ImagePackerNative_PackToDataFromPixelmap

Function OH_ImagePackerNative_PackToDataFromPixelmap 

Source
pub unsafe extern "C" fn OH_ImagePackerNative_PackToDataFromPixelmap(
    imagePacker: *mut OH_ImagePackerNative,
    options: *mut OH_PackingOptions,
    pixelmap: *mut OH_PixelmapNative,
    outData: *mut u8,
    size: *mut usize,
) -> Image_ErrorCode
Expand description

@brief Encoding a Pixelmap into the data with required format.

@param imagePacker The imagePacker to use for packing. @param options Indicates the encoding {@link OH_PackingOptions}. @param pixelmap The pixelmap to be packed. @param outData The output data buffer to store the packed image. @param size A pointer to the size of the output data buffer. @return Image functions result code. {@link IMAGE_SUCCESS} if the execution is successful. {@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr, or pixelmap is nullptr, or outData is nullptr. {@link IMAGE_ENCODE_FAILED} encode failed. @since 12