Skip to main content

OH_ImagePackerNative_PackToFileFromImageSource

Function OH_ImagePackerNative_PackToFileFromImageSource 

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

@brief Encodes an image source into a file.

@param imagePacker Pointer to OH_ImagePackerNative. @param options Pointer to an OH_PackingOptions struct. @param imageSource Pointer to the image source to encode. @param fd File descriptor, which is writable. @return {@link IMAGE_SUCCESS} if the execution is successful.
{@link IMAGE_BAD_PARAMETER}imagePacker is nullptr, or options is nullptr, or imageSource is nullptr, or fd is invalid.
{@link IMAGE_ENCODE_FAILED} encode failed. @since 12