harmony 鸿蒙image_source_mdk.h

  • 2023-10-30
  • 浏览 (475)

image_source_mdk.h

Overview

The image_source_mdk.h file declares the APIs for decoding an image source into a pixel map.

\@Syscap SystemCapability.Multimedia.Image

Since

10

Related Modules

Image

Summary

Structs

Name Description
OhosImageRegion Defines the region of an image source to decode.
OhosImageSourceOps Defines the image source options.
OhosImageDecodingOps Defines the options for decoding an image source.
OhosImageSourceInfo Defines the information about an image source.
OhosImageSource Defines the input resource of an image source. Only one type of resource is accepted at a time.
OhosImageSourceDelayTimeList Defines the delay time list of an image source.
OhosImageSourceSupportedFormat Defines the format string supported by an image source.
OhosImageSourceSupportedFormatList Defines the format string list supported by an image source.
OhosImageSourceProperty Defines the property string (in key-value format) of an image source.
OhosImageSourceUpdateData Defines the update data of an image source.

Types

Name Description
ImageSourceNative Defines an image source object at the native layer.

Functions

Name Description
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.
OH_ImageSource_CreateIncremental (napi_env env, struct OhosImageSource *source, struct OhosImageSourceOps *ops, napi_value *res) Creates an ImageSource object at the JavaScript native layer based on the specified OhosImageSource and OhosImageSourceOps structs. The image source data will be updated through OH_ImageSource_UpdateData.
OH_ImageSource_GetSupportedFormats (struct OhosImageSourceSupportedFormatList *res) Obtains all supported decoding formats.
*OH_ImageSource_InitNative (napi_env env, napi_value source) Converts an ImageSource object at the JavaScript native layer to an ImageSourceNative object.
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.
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.
OH_ImageSource_GetDelayTime (const ImageSourceNative *native, struct OhosImageSourceDelayTimeList *res) Obtains the delay time list from an ImageSourceNative object (such as GIF image source).
OH_ImageSource_GetFrameCount (const ImageSourceNative *native, uint32_t *res) Obtains the number of frames from an ImageSourceNative object.
OH_ImageSource_GetImageInfo (const ImageSourceNative *native, int32_t index, struct OhosImageSourceInfo *info) Obtains image source information from an ImageSourceNative object by index.
OH_ImageSource_GetImageProperty (const ImageSourceNative *native, struct OhosImageSourceProperty *key, struct OhosImageSourceProperty *value) Obtains the value of an image property from an ImageSourceNative object.
OH_ImageSource_ModifyImageProperty (const ImageSourceNative *native, struct OhosImageSourceProperty *key, struct OhosImageSourceProperty *value) Modifies the value of an image property of an ImageSourceNative object.
OH_ImageSource_UpdateData (const ImageSourceNative *native, struct OhosImageSourceUpdateData *data) Updates the data of an ImageSourceNative object.
OH_ImageSource_Release (ImageSourceNative *native) Releases an ImageSourceNative object.

Variables

Name Description
*OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = “BitsPerSample” Defines a pointer to bits per sample, one of the image properties.
*OHOS_IMAGE_PROPERTY_ORIENTATION = “Orientation” Defines a pointer to the orientation, one of the image properties.
*OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = “ImageLength” Defines a pointer to the image length, one of the image properties.
*OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = “ImageWidth” Defines a pointer to the image width, one of the image properties.
*OHOS_IMAGE_PROPERTY_GPS_LATITUDE = “GPSLatitude” Defines a pointer to the GPS latitude, one of the image properties.
*OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = “GPSLongitude” Defines a pointer to the GPS longitude, one of the image properties.
*OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = “GPSLatitudeRef” Defines a pointer to the GPS latitude reference information, one of the image properties.
*OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = “GPSLongitudeRef” Defines a pointer to the GPS longitude reference information, one of the image properties.
*OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = “DateTimeOriginal” Defines a pointer to the created date and time, one of the image properties.
*OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = “ExposureTime” Defines a pointer to the exposure time, one of the image properties.
*OHOS_IMAGE_PROPERTY_SCENE_TYPE = “SceneType” Defines a pointer to the scene type, one of the image properties.
*OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = “ISOSpeedRatings” Defines a pointer to the ISO speed ratings, one of the image properties.
*OHOS_IMAGE_PROPERTY_F_NUMBER = “FNumber” Defines a pointer to the f-number of the image, one of the image properties.
*OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = “CompressedBitsPerPixel” Defines a pointer to the compressed bits per pixel, one of the image properties.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

0  赞