Skip to main content

OH_ImageSourceNative_CreatePixelmapList

Function OH_ImageSourceNative_CreatePixelmapList 

Source
pub unsafe extern "C" fn OH_ImageSourceNative_CreatePixelmapList(
    source: *mut OH_ImageSourceNative,
    options: *mut OH_DecodingOptions,
    resVecPixMap: *mut *mut OH_PixelmapNative,
    size: usize,
) -> Image_ErrorCode
Expand description

@brief Creates an array of OH_PixelmapNative objects based on decoding options. This function decodes all frames at once. If the number of frames is high or the size of individual frames is large, it can lead to significant memory usage. In these cases, you are advised to use the Image component for displaying animations. The Image component decodes frames one by one, which uses less memory than this function.

@param source Pointer to an OH_ImageSourceNative object. @param options Pointer to the decoding options. @param resVecPixMap Indicates a pointer array to the Pixelmap objects obtained at the C++ native layer. It cannot be a null pointer. @param size Size of the array. You can use {@link OH_ImageSourceNative_GetFrameCount} to obtain the size. @return {@link IMAGE_SUCCESS} if the execution is successful.
{@link IMAGE_BAD_PARAMETER} source is nullptr, or options is nullptr, or resVecPixMap is nullptr. @since 12