Skip to main content

OH_ImageSourceNative_GetImageProperty

Function OH_ImageSourceNative_GetImageProperty 

Source
pub unsafe extern "C" fn OH_ImageSourceNative_GetImageProperty(
    source: *mut OH_ImageSourceNative,
    key: *mut Image_String,
    value: *mut Image_String,
) -> Image_ErrorCode
Expand description

@brief Obtains the value of an image property.

@param source Pointer to an OH_ImageSourceNative object. @param key Pointer to the property key. For details, see {@link Image_String}. For details about the value range of key, see the definition of {@link OHOS_IMAGE_PROPERTY_XXX} . The memory must be released after the image source is used. For details, see {@link OH_ImageSourceNative_Release}. @param value Pointer to the value obtained. You can pass in a null pointer with the size set to zero. In this case, the system will allocate memory, but you must release the memory after use. @return {@link IMAGE_SUCCESS} if the execution is successful.
{@link IMAGE_BAD_PARAMETER} source is nullptr, or key is nullptr, or value is nullptr.
{@link IMAGE_ALLOC_FAILED} allocate memory failed.
{@link IMAGE_COPY_FAILED} copy memory failed. @since 12