OH_ImageSource_Info
struct OH_ImageSource_Info
Overview
The OH_ImageSource_Info struct describes the image source information encapsulated at the native layer. The struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate the fields in the struct.
To create an OH_ImageSource_Info object, call OH_ImageSourceInfo_Create.
To release an OH_ImageSource_Info object, call OH_ImageSourceInfo_Release. After this API is called, all properties related to the OH_ImageSource_Info struct are released. Therefore, before calling this API, ensure that the relevant properties are no longer needed or that a deep copy of these properties has been completed.
The table below describes the content and operation mode of the OH_ImageSource_Info struct.
| Field Type | Field Name | Field Description | Operation Function | Function Description |
|---|---|---|---|---|
| uint32_t | width | Image width. | OH_ImageSourceInfo_GetWidth | Obtains the image width. |
| uint32_t | height | Image height. | OH_ImageSourceInfo_GetHeight | Obtains the image height. |
| bool | isHdr | Whether the image is an HDR image. | OH_ImageSourceInfo_GetDynamicRange | Obtains the dynamic range of an image. |
| Image_MimeType | mimeType | Pointer to the image MIME type. | OH_ImageSourceInfo_GetMimetype | Obtains the MIME type of an image. |
Since: 12
Related module: Image_NativeModule
Header file: image_source_native.h