harmony 鸿蒙image_source_mdk.h
image_source_mdk.h
Overview
The image_source_mdk.h file declares the APIs used to decode an image source into a PixelMap.
Library: libimage_source_ndk.z.so
File to include: <multimedia/image_framework/image_source_mdk.h>
System capability: SystemCapability.Multimedia.Image
Since: 10
Related module: Image
Summary
Structs
Name | Description |
---|---|
struct OhosImageRegion | Defines the region of an image source to decode. |
struct OhosImageSourceOps | Defines the image source options. |
struct OhosImageDecodingOps | Defines the options for decoding an image source. |
struct OhosImageSourceInfo | Defines the information about an image source. |
struct OhosImageSource | Defines the input resource of an image source. Only one type of resource is accepted at a time. |
struct OhosImageSourceDelayTimeList | Defines the delay time list of an image source. |
struct OhosImageSourceSupportedFormat | Defines the format string supported by an image source. |
struct OhosImageSourceSupportedFormatList | Defines the format string list supported by an image source. |
struct OhosImageSourceProperty | Defines the property string (in key-value format) of an image source. |
struct OhosImageSourceUpdateData | Defines the update data of an image source. |
Types
Name | Description |
---|---|
typedef struct ImageSourceNative_ ImageSourceNative | Defines an image source object at the native layer. |
Functions
Name | Description |
---|---|
int32_t OH_ImageSource_Create (napi_env env, struct OhosImageSource *src, struct OhosImageSourceOps *ops, napi_value *res) | Creates an ImageSource object at the JavaScript native layer based on the specified OhosImageSource and OhosImageSourceOps structs. |
int32_t OH_ImageSource_CreateFromUri (napi_env env, char *uri, size_t size, struct OhosImageSourceOps *ops, napi_value *res) | Creates an ImageSource object at the JavaScript native layer based on the specified URI and OhosImageSourceOps struct. |
int32_t OH_ImageSource_CreateFromFd (napi_env env, int32_t fd, struct OhosImageSourceOps *ops, napi_value *res) | Creates an ImageSource object at the JavaScript native layer based on the specified file descriptor and OhosImageSourceOps struct. |
int32_t OH_ImageSource_CreateFromData (napi_env env, uint8_t *data, size_t dataSize, struct OhosImageSourceOps *ops, napi_value *res) | Creates an ImageSource object at the JavaScript native layer based on the specified image source buffer (defined by data) and OhosImageSourceOps struct. |
int32_t OH_ImageSource_CreateFromRawFile (napi_env env, RawFileDescriptor rawFile, struct OhosImageSourceOps *ops, napi_value *res) | Creates an ImageSource object at the JavaScript native layer based on the specified raw file descriptor and OhosImageSourceOps struct. |
int32_t OH_ImageSource_CreateIncremental (napi_env env, struct OhosImageSource *source, struct OhosImageSourceOps *ops, napi_value *res) | Creates an ImageSource object of the incremental type at the JavaScript native layer based on the specified OhosImageSource and OhosImageSourceOps structs. |
int32_t OH_ImageSource_CreateIncrementalFromData (napi_env env, uint8_t *data, size_t dataSize, struct OhosImageSourceOps *ops, napi_value *res) | Creates an ImageSource object of the incremental type at the JavaScript native layer based on the specified image source buffer (defined by data) and OhosImageSourceOps struct. The image data is updated through OH_ImageSource_UpdateData. |
int32_t OH_ImageSource_GetSupportedFormats (struct OhosImageSourceSupportedFormatList *res) | Obtains all supported decoding formats. |
ImageSourceNative * OH_ImageSource_InitNative (napi_env env, napi_value source) | Converts an ImageSource object at the JavaScript native layer into an ImageSourceNative object. |
int32_t OH_ImageSource_CreatePixelMap (const ImageSourceNative *native, struct OhosImageDecodingOps *ops, napi_value *res) | Decodes an ImageSourceNative object to obtain a PixelMap object at the JavaScript native layer based on the specified OhosImageDecodingOps struct. |
int32_t OH_ImageSource_CreatePixelMapList (const ImageSourceNative *native, struct OhosImageDecodingOps *ops, napi_value *res) | Decodes an ImageSourceNative object to obtain all PixelMap objects at the JavaScript native layer based on the specified OhosImageDecodingOps struct. |
int32_t OH_ImageSource_GetDelayTime (const ImageSourceNative *native, struct OhosImageSourceDelayTimeList *res) | Obtains the delay time list from an ImageSource object (such as GIF or WEBP image source). |
int32_t OH_ImageSource_GetFrameCount (const ImageSourceNative *native, uint32_t *res) | Obtains the number of frames from an ImageSourceNative object. |
int32_t OH_ImageSource_GetImageInfo (const ImageSourceNative *native, int32_t index, struct OhosImageSourceInfo *info) | Obtains image source information from an ImageSourceNative object by index. |
int32_t OH_ImageSource_GetImageProperty (const ImageSourceNative *native, struct OhosImageSourceProperty *key, struct OhosImageSourceProperty *value) | Obtains the value of an image property from an ImageSourceNative object. |
int32_t OH_ImageSource_ModifyImageProperty (const ImageSourceNative *native, struct OhosImageSourceProperty *key, struct OhosImageSourceProperty *value) | Modifies the value of an image property of an ImageSourceNative object. |
int32_t OH_ImageSource_UpdateData (const ImageSourceNative *native, struct OhosImageSourceUpdateData *data) | Updates the data of an ImageSourceNative object. |
int32_t OH_ImageSource_Release (ImageSourceNative *native) | Releases an ImageSourceNative object. |
Variables
Name | Description |
---|---|
const char * OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = “BitsPerSample” | Defines a pointer to bits per sample, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_ORIENTATION = “Orientation” | Defines a pointer to the orientation, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = “ImageLength” | Defines a pointer to the image length, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = “ImageWidth” | Defines a pointer to the image width, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_GPS_LATITUDE = “GPSLatitude” | Defines a pointer to the GPS latitude, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = “GPSLongitude” | Defines a pointer to the GPS longitude, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = “GPSLatitudeRef” | Defines a pointer to the GPS latitude reference information, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = “GPSLongitudeRef” | Defines a pointer to the GPS longitude reference information, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = “DateTimeOriginal” | Defines a pointer to the created date and time, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = “ExposureTime” | Defines a pointer to the exposure time, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_SCENE_TYPE = “SceneType” | Defines a pointer to the scene type, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = “ISOSpeedRatings” | Defines a pointer to the ISO speed ratings, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_F_NUMBER = “FNumber” | Defines a pointer to the f-number of the image, one of the image properties. |
const char * OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = “CompressedBitsPerPixel” | Defines a pointer to the compressed bits per pixel, one of the image properties. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙_image___native_module
harmony 鸿蒙ImageEffect_FilterDelegate
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦