Skip to main content

OH_ImagePackerNative_PackToFileFromPixelmap

Function OH_ImagePackerNative_PackToFileFromPixelmap 

Source
pub unsafe extern "C" fn OH_ImagePackerNative_PackToFileFromPixelmap(
    imagePacker: *mut OH_ImagePackerNative,
    options: *mut OH_PackingOptions,
    pixelmap: *mut OH_PixelmapNative,
    fd: i32,
) -> Image_ErrorCode
Expand description

@brief Encoding a Pixelmap into the a file with fd with required format

@param imagePacker The image packer to use for packing. @param options Indicates the encoding {@link OH_PackingOptions}. @param pixelmap The pixelmap to be packed. @param fd Indicates a writable file descriptor. @return @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 fd is invalid. {@link IMAGE_ENCODE_FAILED} encode failed. @since 12