Skip to main content

OH_ImageSourceNative_CreateFromUri

Function OH_ImageSourceNative_CreateFromUri 

Source
pub unsafe extern "C" fn OH_ImageSourceNative_CreateFromUri(
    uri: *mut c_char,
    uriSize: usize,
    res: *mut *mut OH_ImageSourceNative,
) -> Image_ErrorCode
Expand description

@brief Creates the pointer to an OH_ImageSourceNative object based on a URI.

@param uri Pointer to the URI of the image source. Only file URIs or Base64 URIs are accepted. Currently, only absolute paths are supported. @param uriSize URI length. @param res Double pointer to the OH_ImageSourceNative object created at the C++ local layer. @return {@link IMAGE_SUCCESS} if the execution is successful.
{@link IMAGE_BAD_PARAMETER} if uri is a null pointer. @since 12