The Image_NativeModule module provides image processing capabilities, including encoding and decoding an image and obtaining image data from the native layer.
The APIs of this module do not need to be imported through the JS interface. You can directly use the NDK to develop the features.
You can refer to the corresponding development guide and samples based on your development requirements.
Since: 12
| Name | Description |
|---|---|
| image_common.h | Declares the common enums and structs used by the image interface. |
| image_native.h | Declares the cropping rectangle, size, and component data of an image. |
| image_packer_native.h | Declares the APIs for image encoding. |
| image_receiver_native.h | Declares the APIs used to obtain image data from the native layer. |
| image_source_native.h | Declares the APIs for image decoding. |
| pixelmap_native.h | Declares the APIs for accessing a PixelMap. |
| Name | Description |
|---|---|
| struct Image_Size | Describes the image size. |
| struct Image_Region | Describes the region of an image to decode. |
| struct Image_String | Describes an image string. |
| struct OH_Pixelmap_HdrStaticMetadata | Describes the static metadata values available for the key HDR_STATIC_METADATA. |
| struct OH_Pixelmap_HdrDynamicMetadata | Describes the dynamic metadata values available for the key DR_DYNAMIC_METADATA. |
| struct OH_Pixelmap_HdrGainmapMetadata | Describes the gain map metadata values available for the key HDR_GAINMAP_METADATA. For details, see ISO 21496-1. |
| struct OH_Pixelmap_HdrMetadataValue | Describes the HDR metadata values used by the PixelMap and available for the key OH_Pixelmap_HdrMetadataKey. |
| Name | Description |
|---|---|
| typedef struct Image_Size Image_Size | Defines a struct for the image size. |
| typedef struct Image_Region Image_Region | Defines a struct for the region of an image to decode. |
| typedef struct Image_String Image_String | Defines a struct for an image string. |
| typedef struct Image_String Image_MimeType | Defines a struct for an image format type. |
| typedef struct OH_ImageNative OH_ImageNative | Defines the alias for an image object at the native layer. |
| typedef struct OH_ImagePackerNative OH_ImagePackerNative | Defines a struct for the image packer, which is used to perform operations related to an image packer. |
| typedef struct OH_PackingOptions OH_PackingOptions | Defines a struct for image encoding parameters. |
| typedef struct OH_ImageReceiverNative OH_ImageReceiverNative | Defines the data type name of the image receiver at the native layer. |
| typedef struct OH_ImageReceiverOptions OH_ImageReceiverOptions | Defines the data type name of the image receiver options. |
| typedef void(* OH_ImageReceiver_OnCallback) (OH_ImageReceiverNative *receiver) | Defines the callbacks for the image receiver at the native layer. |
| typedef struct OH_ImageSourceNative OH_ImageSourceNative | Defines a struct for the image source, which is used to perform operations related to an image source. |
| typedef struct OH_ImageSource_Info OH_ImageSource_Info | Defines a struct for the image source information, which is created by calling OH_ImageSourceInfo_Create. |
| typedef struct OH_DecodingOptions OH_DecodingOptions | Defines a struct for decoding parameters, which are used in OH_ImageSourceNative_CreatePixelmap. |
| typedef struct OH_PixelmapNative OH_PixelmapNative | Defines a struct for the PixelMap, which is used to perform operations related to a PixelMap. |
| typedef struct OH_NativeBuffer OH_NativeBuffer | Defines a struct for the native buffer, which is used to perform operations related to the native buffer. |
| typedef struct OH_Pixelmap_HdrStaticMetadata OH_Pixelmap_HdrStaticMetadata | Defines a struct for the static metadata values available for the key HDR_STATIC_METADATA. |
| typedef struct OH_Pixelmap_HdrDynamicMetadata OH_Pixelmap_HdrDynamicMetadata | Defines a struct for the dynamic metadata values available for the key DR_DYNAMIC_METADATA. |
| typedef struct OH_Pixelmap_HdrGainmapMetadata OH_Pixelmap_HdrGainmapMetadata | Defines a struct for the gain map metadata values available for the key HDR_GAINMAP_METADATA. For details, see ISO 21496-1. |
| typedef struct OH_Pixelmap_HdrMetadataValue OH_Pixelmap_HdrMetadataValue | Defines a struct for the HDR metadata values used by the PixelMap and available for the key OH_Pixelmap_HdrMetadataKey. It is used in OH_PixelmapNative_SetMetadata and OH_PixelmapNative_GetMetadata. |
| typedef struct OH_Pixelmap_InitializationOptions OH_Pixelmap_InitializationOptions | Defines a struct for the initialization parameters. |
| typedef struct OH_Pixelmap_ImageInfo OH_Pixelmap_ImageInfo | Defines a struct for the image information. |
| Name | Description |
|---|---|
| IMAGE_SUCCESS = 0, IMAGE_BAD_PARAMETER = 401, IMAGE_UNSUPPORTED_MIME_TYPE = 7600101, IMAGE_UNKNOWN_MIME_TYPE = 7600102, IMAGE_TOO_LARGE = 7600103, IMAGE_DMA_NOT_EXIST = 7600173, IMAGE_DMA_OPERATION_FAILED = 7600174, IMAGE_UNSUPPORTED_OPERATION = 7600201, IMAGE_UNSUPPORTED_METADATA = 7600202, IMAGE_UNSUPPORTED_CONVERSION = 7600203, IMAGE_INVALID_REGION = 7600204, IMAGE_ALLOC_FAILED = 7600301, IMAGE_COPY_FAILED = 7600302, IMAGE_UNKNOWN_ERROR = 7600901, IMAGE_BAD_SOURCE = 7700101, IMAGE_DECODE_FAILED = 7700301, IMAGE_ENCODE_FAILED = 7800301 } | Enumerates the error codes. |
| IMAGE_PACKER_DYNAMIC_RANGE_AUTO = 0, IMAGE_PACKER_DYNAMIC_RANGE_SDR = 1 } | Enumerates the desired dynamic range for encoding. |
| IMAGE_DYNAMIC_RANGE_AUTO = 0, IMAGE_DYNAMIC_RANGE_SDR = 1, IMAGE_DYNAMIC_RANGE_HDR = 2 } | Enumerates the desired dynamic range for decoding. |
| PIXELMAP_ALPHA_TYPE_UNKNOWN = 0, PIXELMAP_ALPHA_TYPE_OPAQUE = 1, PIXELMAP_ALPHA_TYPE_PREMULTIPLIED = 2, PIXELMAP_ALPHA_TYPE_UNPREMULTIPLIED = 3 } | Enumerates the alpha types of a PixelMap. |
| PIXEL_FORMAT_UNKNOWN = 0, PIXEL_FORMAT_RGB_565 = 2, PIXEL_FORMAT_RGBA_8888 = 3, PIXEL_FORMAT_BGRA_8888 = 4, PIXEL_FORMAT_RGB_888 = 5, PIXEL_FORMAT_ALPHA_8 = 6, PIXEL_FORMAT_RGBA_F16 = 7, PIXEL_FORMAT_NV21 = 8, PIXEL_FORMAT_NV12 = 9, PIXEL_FORMAT_RGBA_1010102 = 10, PIXEL_FORMAT_YCBCR_P010 = 11, PIXEL_FORMAT_YCRCB_P010 = 12 } | Enumerates the image pixel formats. |
| OH_PixelmapNative_AntiAliasingLevel { OH_PixelmapNative_AntiAliasing_NONE = 0, OH_PixelmapNative_AntiAliasing_LOW = 1, OH_PixelmapNative_AntiAliasing_MEDIUM = 2, OH_PixelmapNative_AntiAliasing_HIGH = 3 } | Enumerates the antialiasing levels used for scaling PixelMaps. |
| HDR_METADATA_TYPE = 0, HDR_STATIC_METADATA = 1, HDR_DYNAMIC_METADATA = 2, HDR_GAINMAP_METADATA = 3 } | Enumerates the keys of the HDR related metadata information used by the PixelMap. It is used in OH_PixelmapNative_SetMetadata and OH_PixelmapNative_GetMetadata. |
| HDR_METADATA_TYPE_NONE = 0, HDR_METADATA_TYPE_BASE = 1, HDR_METADATA_TYPE_GAINMAP = 2, HDR_METADATA_TYPE_ALTERNATE = 3 } | Enumerates the HDR metadata types, which are the values of HDR_METADATA_TYPE. |
| Name | Description |
|---|---|
| Image_ErrorCode OH_ImageNative_GetImageSize (OH_ImageNative *image, Image_Size *size) | Obtains the Image_Size information of a native OH_ImageNative object. |
| Image_ErrorCode OH_ImageNative_GetComponentTypes (OH_ImageNative *image, uint32_t **types, size_t *typeSize) | Obtains the component types of a native OH_ImageNative object. |
| Image_ErrorCode OH_ImageNative_GetByteBuffer (OH_ImageNative *image, uint32_t componentType, OH_NativeBuffer **nativeBuffer) | Obtains the buffer corresponding to a component type in a native OH_ImageNative object. |
| Image_ErrorCode OH_ImageNative_GetBufferSize (OH_ImageNative *image, uint32_t componentType, size_t *size) | Obtains the size of the buffer corresponding to a component type in a native OH_ImageNative object. |
| Image_ErrorCode OH_ImageNative_GetRowStride (OH_ImageNative *image, uint32_t componentType, int32_t *rowStride) | Obtains the row stride corresponding to a component type in a native OH_ImageNative object. |
| Image_ErrorCode OH_ImageNative_GetPixelStride (OH_ImageNative *image, uint32_t componentType, int32_t *pixelStride) | Obtains the pixel stride corresponding to a component type in a native OH_ImageNative object. |
| Image_ErrorCode OH_ImageNative_GetTimestamp (OH_ImageNative *image, int64_t *timestamp) | Obtains the timestamp of a native OH_ImageNative object. |
| Image_ErrorCode OH_ImageNative_Release (OH_ImageNative *image) | Releases a native OH_ImageNative object. |
| Image_ErrorCode OH_PackingOptions_Create (OH_PackingOptions **options) | Creates the pointer to an OH_PackingOptions struct. |
| Image_ErrorCode OH_PackingOptions_GetMimeType (OH_PackingOptions *options, Image_MimeType *format) | Obtains the MIME type. |
| Image_ErrorCode OH_PackingOptions_SetMimeType (OH_PackingOptions *options, Image_MimeType *format) | Sets the MIME type. |
| Image_ErrorCode OH_PackingOptions_GetQuality (OH_PackingOptions *options, uint32_t *quality) | Obtains the encoding quality. |
| Image_ErrorCode OH_PackingOptions_SetQuality (OH_PackingOptions *options, uint32_t quality) | Sets the encoding quality. |
| Image_ErrorCode OH_PackingOptions_GetDesiredDynamicRange (OH_PackingOptions *options, int32_t *desiredDynamicRange) | Obtains the desired dynamic range during encoding. |
| Image_ErrorCode OH_PackingOptions_SetDesiredDynamicRange (OH_PackingOptions *options, int32_t desiredDynamicRange) | Sets the desired dynamic range during encoding. |
| Image_ErrorCode OH_PackingOptions_Release (OH_PackingOptions *options) | Releases the pointer to an OH_PackingOptions struct. |
| Image_ErrorCode OH_ImagePackerNative_Create (OH_ImagePackerNative **imagePacker) | Creates the pointer to an OH_ImagePackerNative object. |
| Image_ErrorCode OH_ImagePackerNative_PackToDataFromImageSource (OH_ImagePackerNative *imagePacker, OH_PackingOptions *options, OH_ImageSourceNative *imageSource, uint8_t *outData, size_t *size) | Encodes an image source into data in a given format. |
| Image_ErrorCode OH_ImagePackerNative_PackToDataFromPixelmap (OH_ImagePackerNative *imagePacker, OH_PackingOptions *options, OH_PixelmapNative *pixelmap, uint8_t *outData, size_t *size) | Encodes a PixelMap into data in a given format. |
| Image_ErrorCode OH_ImagePackerNative_PackToFileFromImageSource (OH_ImagePackerNative *imagePacker, OH_PackingOptions *options, OH_ImageSourceNative *imageSource, int32_t fd) | Encodes an image source into a file. |
| Image_ErrorCode OH_ImagePackerNative_PackToFileFromPixelmap (OH_ImagePackerNative *imagePacker, OH_PackingOptions *options, OH_PixelmapNative *pixelmap, int32_t fd) | Encodes a PixelMap into a file. |
| Image_ErrorCode OH_ImagePackerNative_Release (OH_ImagePackerNative *imagePacker) | Releases the pointer to an OH_ImagePackerNative object. |
| Image_ErrorCode OH_ImageReceiverOptions_Create (OH_ImageReceiverOptions **options) | Creates an OH_ImageReceiverOptions object at the application layer. |
| Image_ErrorCode OH_ImageReceiverOptions_GetSize (OH_ImageReceiverOptions *options, Image_Size *size) | Obtains the Image_Size information of an OH_ImageReceiverOptions object. |
| Image_ErrorCode OH_ImageReceiverOptions_SetSize (OH_ImageReceiverOptions *options, Image_Size size) | Sets the Image_Size information for an OH_ImageReceiverOptions object. |
| Image_ErrorCode OH_ImageReceiverOptions_GetCapacity (OH_ImageReceiverOptions *options, int32_t *capacity) | Obtains the capacity of an OH_ImageReceiverOptions object. |
| Image_ErrorCode OH_ImageReceiverOptions_SetCapacity (OH_ImageReceiverOptions *options, int32_t capacity) | Sets the capacity for an OH_ImageReceiverOptions object. |
| Image_ErrorCode OH_ImageReceiverOptions_Release (OH_ImageReceiverOptions *options) | Releases an OH_ImageReceiverOptions object. |
| Image_ErrorCode OH_ImageReceiverNative_Create (OH_ImageReceiverOptions *options, OH_ImageReceiverNative **receiver) | Creates an OH_ImageReceiverNative object at the application layer. |
| Image_ErrorCode OH_ImageReceiverNative_GetReceivingSurfaceId (OH_ImageReceiverNative *receiver, uint64_t *surfaceId) | Obtains the receiver ID through an OH_ImageReceiverNative object. |
| Image_ErrorCode OH_ImageReceiverNative_ReadLatestImage (OH_ImageReceiverNative *receiver, OH_ImageNative **image) | Obtains the latest image through an OH_ImageReceiverNative object. |
| Image_ErrorCode OH_ImageReceiverNative_ReadNextImage (OH_ImageReceiverNative *receiver, OH_ImageNative **image) | Obtains the next image through an OH_ImageReceiverNative object. |
| Image_ErrorCode OH_ImageReceiverNative_On (OH_ImageReceiverNative *receiver, OH_ImageReceiver_OnCallback callback) | Registers the callback defined in OH_ImageReceiver_OnCallback. |
| Image_ErrorCode OH_ImageReceiverNative_Off (OH_ImageReceiverNative *receiver) | Unregisters the callback defined in OH_ImageReceiver_OnCallback. |
| Image_ErrorCode OH_ImageReceiverNative_GetSize (OH_ImageReceiverNative *receiver, Image_Size *size) | Obtains the size of an image receiver, which is an OH_ImageReceiverNative object. |
| Image_ErrorCode OH_ImageReceiverNative_GetCapacity (OH_ImageReceiverNative *receiver, int32_t *capacity) | Obtains the capacity of an image receiver, which is an OH_ImageReceiverNative object. |
| Image_ErrorCode OH_ImageReceiverNative_Release (OH_ImageReceiverNative *receiver) | Releases a native OH_ImageReceiverNative object. |
| Image_ErrorCode OH_ImageSourceInfo_Create (OH_ImageSource_Info **info) | Creates the pointer to an OH_ImageSource_Info struct. |
| Image_ErrorCode OH_ImageSourceInfo_GetWidth (OH_ImageSource_Info *info, uint32_t *width) | Obtains the image width. |
| Image_ErrorCode OH_ImageSourceInfo_GetHeight (OH_ImageSource_Info *info, uint32_t *height) | Obtains the image height. |
| Image_ErrorCode OH_ImageSourceInfo_GetDynamicRange (OH_ImageSource_Info *info, bool *isHdr) | Obtains the dynamic range of an image. |
| Image_ErrorCode OH_ImageSourceInfo_Release (OH_ImageSource_Info *info) | Releases the pointer to an OH_ImageSource_Info struct. |
| Image_ErrorCode OH_DecodingOptions_Create (OH_DecodingOptions **options) | Creates the pointer to an OH_DecodingOptions struct. |
| Image_ErrorCode OH_DecodingOptions_GetPixelFormat (OH_DecodingOptions *options, int32_t *pixelFormat) | Obtains the pixel format. |
| Image_ErrorCode OH_DecodingOptions_SetPixelFormat (OH_DecodingOptions *options, int32_t pixelFormat) | Sets the pixel format. |
| Image_ErrorCode OH_DecodingOptions_GetIndex (OH_DecodingOptions *options, uint32_t *index) | Obtains the index of an image. |
| Image_ErrorCode OH_DecodingOptions_SetIndex (OH_DecodingOptions *options, uint32_t index) | Sets the index for an image. |
| Image_ErrorCode OH_DecodingOptions_GetRotate (OH_DecodingOptions *options, float *rotate) | Obtains the rotation degree. |
| Image_ErrorCode OH_DecodingOptions_SetRotate (OH_DecodingOptions *options, float rotate) | Sets the rotation angle. |
| Image_ErrorCode OH_DecodingOptions_GetDesiredSize (OH_DecodingOptions *options, Image_Size *desiredSize) | Obtains the desired output size. |
| Image_ErrorCode OH_DecodingOptions_SetDesiredSize (OH_DecodingOptions *options, Image_Size *desiredSize) | Sets the desired output size. |
| Image_ErrorCode OH_DecodingOptions_GetDesiredRegion (OH_DecodingOptions *options, Image_Region *desiredRegion) | Obtains the region to decode. |
| Image_ErrorCode OH_DecodingOptions_SetDesiredRegion (OH_DecodingOptions *options, Image_Region *desiredRegion) | Sets the region to decode. |
| Image_ErrorCode OH_DecodingOptions_GetDesiredDynamicRange (OH_DecodingOptions *options, int32_t *desiredDynamicRange) | Obtains the desired dynamic range configured during decoding. |
| Image_ErrorCode OH_DecodingOptions_SetDesiredDynamicRange (OH_DecodingOptions *options, int32_t desiredDynamicRange) | Sets the desired dynamic range during decoding. |
| Image_ErrorCode OH_DecodingOptions_Release (OH_DecodingOptions *options) | Releases the pointer to an OH_DecodingOptions struct. |
| Image_ErrorCode OH_ImageSourceNative_CreateFromUri (char *uri, size_t uriSize, OH_ImageSourceNative **res) | Creates the pointer to an OH_ImageSourceNative object based on a URI. |
| Image_ErrorCode OH_ImageSourceNative_CreateFromFd (int32_t fd, OH_ImageSourceNative **res) | Creates the pointer to an OH_ImageSourceNative object based on a file descriptor. |
| Image_ErrorCode OH_ImageSourceNative_CreateFromData (uint8_t *data, size_t dataSize, OH_ImageSourceNative **res) | Creates the pointer to an OH_ImageSourceNative object based on buffer data. |
| Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile (RawFileDescriptor *rawFile, OH_ImageSourceNative **res) | Creates the pointer to an OH_ImageSourceNative object by using the raw file descriptor of an image resource file. |
| Image_ErrorCode OH_ImageSourceNative_CreatePixelmap (OH_ImageSourceNative *source, OH_DecodingOptions *options, OH_PixelmapNative **pixelmap) | Creates the pointer to an OH_PixelmapNative object based on image decoding parameters. |
| Image_ErrorCode OH_ImageSourceNative_CreatePixelmapList (OH_ImageSourceNative *source, OH_DecodingOptions *options, OH_PixelmapNative *resVecPixMap[], size_t size) | Creates an array of OH_PixelmapNative objects based on image decoding parameters. |
| Image_ErrorCode OH_ImageSourceNative_GetDelayTimeList (OH_ImageSourceNative *source, int32_t *delayTimeList, size_t size) | Obtains the image delay time list. |
| Image_ErrorCode OH_ImageSourceNative_GetImageInfo (OH_ImageSourceNative *source, int32_t index, OH_ImageSource_Info *info) | Obtains the information about an image with a given index. |
| Image_ErrorCode OH_ImageSourceNative_GetImageProperty (OH_ImageSourceNative *source, Image_String *key, Image_String *value) | Obtains the value of an image property. |
| Image_ErrorCode OH_ImageSourceNative_ModifyImageProperty (OH_ImageSourceNative *source, Image_String *key, Image_String *value) | Modifies the value of an image property. |
| Image_ErrorCode OH_ImageSourceNative_GetFrameCount (OH_ImageSourceNative *source, uint32_t *frameCount) | Obtains the number of image frames. |
| Image_ErrorCode OH_ImageSourceNative_Release (OH_ImageSourceNative *source) | Releases the pointer to an OH_ImageSourceNative object. |
| Image_ErrorCode OH_PixelmapInitializationOptions_Create (OH_Pixelmap_InitializationOptions **options) | Creates the pointer to an OH_Pixelmap_InitializationOptions struct. |
| Image_ErrorCode OH_PixelmapInitializationOptions_GetWidth (OH_Pixelmap_InitializationOptions *options, uint32_t *width) | Obtains the image width. |
| Image_ErrorCode OH_PixelmapInitializationOptions_SetWidth (OH_Pixelmap_InitializationOptions *options, uint32_t width) | Sets the image width. |
| Image_ErrorCode OH_PixelmapInitializationOptions_GetHeight (OH_Pixelmap_InitializationOptions *options, uint32_t *height) | Obtains the image height. |
| Image_ErrorCode OH_PixelmapInitializationOptions_SetHeight (OH_Pixelmap_InitializationOptions *options, uint32_t height) | Sets the image height. |
| Image_ErrorCode OH_PixelmapInitializationOptions_GetPixelFormat (OH_Pixelmap_InitializationOptions *options, int32_t *pixelFormat) | Obtains the pixel format. |
| Image_ErrorCode OH_PixelmapInitializationOptions_SetPixelFormat (OH_Pixelmap_InitializationOptions *options, int32_t pixelFormat) | Sets the pixel format. |
| Image_ErrorCode OH_PixelmapInitializationOptions_GetSrcPixelFormat (OH_Pixelmap_InitializationOptions *options, int32_t *srcpixelFormat) | Obtains the source pixel format. |
| Image_ErrorCode OH_PixelmapInitializationOptions_SetSrcPixelFormat (OH_Pixelmap_InitializationOptions *options, int32_t srcpixelFormat) | Sets the source pixel format. |
| Image_ErrorCode OH_PixelmapInitializationOptions_GetRowStride (OH_Pixelmap_InitializationOptions *options, int32_t *rowStride) | Obtains the row stride. |
| Image_ErrorCode OH_PixelmapInitializationOptions_SetRowStride (OH_Pixelmap_InitializationOptions *options, int32_t rowStride) | Sets the row stride. |
| Image_ErrorCode OH_PixelmapInitializationOptions_GetAlphaType (OH_Pixelmap_InitializationOptions *options, int32_t *alphaType) | Obtains the alpha type. |
| Image_ErrorCode OH_PixelmapInitializationOptions_SetAlphaType (OH_Pixelmap_InitializationOptions *options, int32_t alphaType) | Sets the alpha type. |
| Image_ErrorCode OH_PixelmapInitializationOptions_Release (OH_Pixelmap_InitializationOptions *options) | Releases the pointer to an OH_Pixelmap_InitializationOptions struct. |
| Image_ErrorCode OH_PixelmapImageInfo_Create (OH_Pixelmap_ImageInfo **info) | Creates the pointer to an OH_Pixelmap_ImageInfo struct. |
| Image_ErrorCode OH_PixelmapImageInfo_GetWidth (OH_Pixelmap_ImageInfo *info, uint32_t *width) | Obtains the image width. |
| Image_ErrorCode OH_PixelmapImageInfo_GetHeight (OH_Pixelmap_ImageInfo *info, uint32_t *height) | Obtains the image height. |
| Image_ErrorCode OH_PixelmapImageInfo_GetRowStride (OH_Pixelmap_ImageInfo *info, uint32_t *rowStride) | Obtains the row stride. |
| Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat (OH_Pixelmap_ImageInfo *info, int32_t *pixelFormat) | Obtains the pixel format. |
| Image_ErrorCode OH_PixelmapImageInfo_GetAlphaType (OH_Pixelmap_ImageInfo *info, int32_t *alphaType) | Obtains the alpha type. |
| Image_ErrorCode OH_PixelmapImageInfo_GetDynamicRange (OH_Pixelmap_ImageInfo *info, bool *isHdr) | Obtains the dynamic range of a PixelMap. |
| Image_ErrorCode OH_PixelmapImageInfo_Release (OH_Pixelmap_ImageInfo *info) | Releases the pointer to an OH_Pixelmap_ImageInfo struct. |
| Image_ErrorCode OH_PixelmapNative_CreatePixelmap (uint8_t *data, size_t dataLength, OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap) | Creates a PixelMap based on properties. By default, the BGRA_8888 format is used for data processing. |
| Image_ErrorCode OH_PixelmapNative_ConvertPixelmapNativeToNapi (napi_env env, OH_PixelmapNative *pixelmapNative, napi_value *pixelmapNapi) | Converts a nativePixelMap object to a PixelMapnapi object. |
| Image_ErrorCode OH_PixelmapNative_ConvertPixelmapNativeFromNapi (napi_env env, napi_value pixelmapNapi, OH_PixelmapNative **pixelmapNative) | Converts a PixelMapnapi object to a nativePixelMap object. |
| Image_ErrorCode OH_PixelmapNative_ReadPixels (OH_PixelmapNative *pixelmap, uint8_t *destination, size_t *bufferSize) | Reads the pixels of a PixelMap and writes the result to an ArrayBuffer. |
| Image_ErrorCode OH_PixelmapNative_WritePixels (OH_PixelmapNative *pixelmap, uint8_t *source, size_t bufferSize) | Reads the pixels in the buffer and writes the result to a PixelMap. |
| Image_ErrorCode OH_PixelmapNative_ToSdr (OH_PixelmapNative *pixelmap) | Converts a PixelMap from the HDR format to the SDR format. |
| Image_ErrorCode OH_PixelmapNative_GetImageInfo (OH_PixelmapNative *pixelmap, OH_Pixelmap_ImageInfo *imageInfo) | Obtains the image information of a PixelMap. |
| Image_ErrorCode OH_PixelmapNative_Opacity (OH_PixelmapNative *pixelmap, float rate) | Sets the opacity rate to enable the PixelMap to achieve the corresponding opacity effect. |
| Image_ErrorCode OH_PixelmapNative_Scale (OH_PixelmapNative *pixelmap, float scaleX, float scaleY) | Scales a PixelMap based on a given width and height. |
| Image_ErrorCode OH_PixelmapNative_ScaleWithAntiAliasing (OH_PixelmapNative *pixelmap, float scaleX, float scaleY, OH_PixelmapNative_AntiAliasingLevel level) | Scales a PixelMap based on the specified antialiasing level, width, and height. |
| Image_ErrorCode OH_PixelmapNative_Translate (OH_PixelmapNative *pixelmap, float x, float y) | Translates a PixelMap based on given coordinates. |
| Image_ErrorCode OH_PixelmapNative_Rotate (OH_PixelmapNative *pixelmap, float angle) | Rotates a PixelMap based on a given angle. |
| Image_ErrorCode OH_PixelmapNative_Flip (OH_PixelmapNative *pixelmap, bool shouldFilpHorizontally, bool shouldFilpVertically) | Flips a PixelMap based on a given angle. |
| Image_ErrorCode OH_PixelmapNative_Crop (OH_PixelmapNative *pixelmap, Image_Region *region) | Crops a PixelMap based on a given size. |
| Image_ErrorCode OH_PixelmapNative_Release (OH_PixelmapNative *pixelmap) | Releases the pointer to an OH_PixelmapNative object. |
| Image_ErrorCode OH_PixelmapNative_ConvertAlphaFormat (OH_PixelmapNative *pixelmap, OH_PixelmapNative *dstpixelmap, const bool isPremul) | Converts pixel data of a PixelMap from premultiplied alpha to non-premultiplied alpha, or vice versa. |
| Image_ErrorCode OH_PixelmapNative_CreateEmptyPixelmap (OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap) | Creates an empty PixelMap using OH_Pixelmap_InitializationOptions. The memory data is 0. |
| Image_ErrorCode OH_PixelmapNative_GetNativeBuffer (OH_PixelmapNative *pixelmap, OH_NativeBuffer **nativeBuffer) | Obtains the NativeBuffer object from a PixelMap in the DMA memory. |
| Image_ErrorCode OH_PixelmapNative_GetMetadata (OH_PixelmapNative *pixelmap, OH_Pixelmap_HdrMetadataKey key, OH_Pixelmap_HdrMetadataValue **value) | Obtains the metadata. |
| Image_ErrorCode OH_PixelmapNative_SetMetadata (OH_PixelmapNative *pixelmap, OH_Pixelmap_HdrMetadataKey key, OH_Pixelmap_HdrMetadataValue *value) | Sets the metadata. |
| Name | Description |
|---|---|
| static const char *MIME_TYPE_BMP = "image/bmp" | BMP image format. |
| static const char *MIME_TYPE_JPEG = "image/jpeg" | JPEG image format. |
| static const char *MIME_TYPE_HEIC = "image/heic" | HEIF image format. |
| static const char *MIME_TYPE_PNG = "image/png" | PNG image format. |
| static const char *MIME_TYPE_WEBP = "image/webp" | WebP image format. |
| static const char *MIME_TYPE_GIF = "image/gif" | GIF image format. |
| static const char *MIME_TYPE_ICON = "image/x-icon" | ICO image format. |
| static const char *OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = "BitsPerSample" | Number of bits per sample. |
| static const char *OHOS_IMAGE_PROPERTY_ORIENTATION = "Orientation" | Image orientation. |
| static const char *OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = "ImageLength" | Image length. |
| static const char *OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = "ImageWidth" | Image width. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_LATITUDE = "GPSLatitude" | Image latitude. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = "GPSLongitude" | Image longitude. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = "GPSLatitudeRef" | Whether the latitude is north or south latitude. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = "GPSLongitudeRef" | Whether the longitude is east or west longitude. |
| static const char *OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = "DateTimeOriginal" | Shooting time, for example, 2022:09:06 15:48:00. |
| static const char *OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = "ExposureTime" | Exposure time, for example, 1/33 seconds. |
| static const char *OHOS_IMAGE_PROPERTY_SCENE_TYPE = "SceneType" | Type of the scene, for example, portrait, scenery, motion, and night. |
| static const char *OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = "ISOSpeedRatings" | ISO sensitivity or ISO speed, for example, 400. |
| static const char *OHOS_IMAGE_PROPERTY_F_NUMBER = "FNumber" | F number, for example, f/1.8. |
| static const char *OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = "CompressedBitsPerPixel" | Number of bits per pixel. It is specific to compressed data. |
| static const char *OHOS_IMAGE_PROPERTY_COMPRESSION = "Compression" | Compression scheme used on the image data. |
| static const char *OHOS_IMAGE_PROPERTY_PHOTOMETRIC_INTERPRETATION = "PhotometricInterpretation" | Color space of the image data, for example, RGB or YCbCr. |
| static const char *OHOS_IMAGE_PROPERTY_STRIP_OFFSETS = "StripOffsets" | Byte offset of each strip. |
| static const char *OHOS_IMAGE_PROPERTY_SAMPLES_PER_PIXEL = "SamplesPerPixel" | Number of components per pixel. The value is 3 for RGB and YCbCr images. The JPEG key is used in JPEG compressed data. |
| static const char *OHOS_IMAGE_PROPERTY_ROWS_PER_STRIP = "RowsPerStrip" | Number of rows per strip. |
| static const char *OHOS_IMAGE_PROPERTY_STRIP_BYTE_COUNTS = "StripByteCounts" | Number of bytes in each strip after compression. |
| static const char *OHOS_IMAGE_PROPERTY_X_RESOLUTION = "XResolution" | Number of pixels per ResolutionUnit in the image width (X) direction. |
| static const char *OHOS_IMAGE_PROPERTY_Y_RESOLUTION = "YResolution" | Number of pixels per ResolutionUnit in the image height (Y) direction. |
| static const char *OHOS_IMAGE_PROPERTY_PLANAR_CONFIGURATION = "PlanarConfiguration" | Storage format of components of each pixel, which can be chunky or planar. |
| static const char *OHOS_IMAGE_PROPERTY_RESOLUTION_UNIT = "ResolutionUnit" | Unit of measurement for XResolution and YResolution. |
| static const char *OHOS_IMAGE_PROPERTY_TRANSFER_FUNCTION = "TransferFunction" | Transfer function for the image, which is usually used for color correction. |
| static const char *OHOS_IMAGE_PROPERTY_SOFTWARE = "Software" | Name and version number of the software used to create the image. |
| static const char *OHOS_IMAGE_PROPERTY_ARTIST = "Artist" | Person who created the image. |
| static const char *OHOS_IMAGE_PROPERTY_WHITE_POINT = "WhitePoint" | Chromaticity of the white point of the image. |
| static const char *OHOS_IMAGE_PROPERTY_PRIMARY_CHROMATICITIES = "PrimaryChromaticities" | Chromaticities of the primaries of the image. |
| static const char *OHOS_IMAGE_PROPERTY_YCBCR_COEFFICIENTS = "YCbCrCoefficients" | Transformation from RGB to YCbCr image data. |
| static const char *OHOS_IMAGE_PROPERTY_YCBCR_SUB_SAMPLING = "YCbCrSubSampling" | Subsampling factors used for the chrominance components of a YCbCr image. |
| static const char *OHOS_IMAGE_PROPERTY_YCBCR_POSITIONING = "YCbCrPositioning" | Positioning of subsampled chrominance components relative to luminance samples. |
| static const char *OHOS_IMAGE_PROPERTY_REFERENCE_BLACK_WHITE = "ReferenceBlackWhite" | A pair of headroom and footroom image data values (codes) for each pixel component. |
| static const char *OHOS_IMAGE_PROPERTY_COPYRIGHT = "Copyright" | Copyright notice of the image. |
| static const char *OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT = "JPEGInterchangeFormat" | Offset of the SOI marker of a JPEG interchange format bitstream. |
| static const char *OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT_LENGTH = "JPEGInterchangeFormatLength" | Number of bytes of the JPEG stream. |
| static const char *OHOS_IMAGE_PROPERTY_EXPOSURE_PROGRAM = "ExposureProgram" | Class of the program used by the camera to set exposure when the image was captured. |
| static const char *OHOS_IMAGE_PROPERTY_SPECTRAL_SENSITIVITY = "SpectralSensitivity" | Spectral sensitivity of each channel of the camera. |
| static const char *OHOS_IMAGE_PROPERTY_OECF = "OECF" | Opto-Electric Conversion Function (OECF) specified in ISO 14524. |
| static const char *OHOS_IMAGE_PROPERTY_EXIF_VERSION = "ExifVersion" | Version of the supported EXIF standard. |
| static const char *OHOS_IMAGE_PROPERTY_DATE_TIME_DIGITIZED = "DateTimeDigitized" | Date and time when the image was stored as digital data, in the format of YYYY:MM:DD HH:MM:SS. |
| static const char *OHOS_IMAGE_PROPERTY_COMPONENTS_CONFIGURATION = "ComponentsConfiguration" | Specific information about compressed data. |
| static const char *OHOS_IMAGE_PROPERTY_SHUTTER_SPEED_VALUE = "ShutterSpeedValue" | Shutter speed, expressed in Additive System of Photographic Exposure (APEX) values. |
| static const char *OHOS_IMAGE_PROPERTY_BRIGHTNESS_VALUE = "BrightnessValue" | Value of brightness, expressed in APEX values. |
| static const char *OHOS_IMAGE_PROPERTY_MAX_APERTURE_VALUE = "MaxApertureValue" | Smallest F number of the lens. |
| static const char *OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE = "SubjectDistance" | Distance to the subject, in meters. |
| static const char *OHOS_IMAGE_PROPERTY_SUBJECT_AREA = "SubjectArea" | Location and area of the main subject in the entire scene. |
| static const char *OHOS_IMAGE_PROPERTY_MAKER_NOTE = "MakerNote" | Marker used by EXIF/DCF manufacturers to record any required information. |
| static const char *OHOS_IMAGE_PROPERTY_SUBSEC_TIME = "SubsecTime" | Tag used to record fractions of seconds for the DateTime tag. |
| static const char *OHOS_IMAGE_PROPERTY_SUBSEC_TIME_ORIGINAL = "SubsecTimeOriginal" | Tag used to record fractions of seconds for the DateTimeOriginal tag. |
| static const char *OHOS_IMAGE_PROPERTY_SUBSEC_TIME_DIGITIZED = "SubsecTimeDigitized" | Tag used to record fractions of seconds for the DateTimeDigitized tag. |
| static const char *OHOS_IMAGE_PROPERTY_FLASHPIX_VERSION = "FlashpixVersion" | FlashPix format version supported by an FPXR file. It is used to enhance device compatibility. |
| static const char *OHOS_IMAGE_PROPERTY_COLOR_SPACE = "ColorSpace" | Color space information, which is usually recorded as a color space specifier. |
| static const char *OHOS_IMAGE_PROPERTY_RELATED_SOUND_FILE = "RelatedSoundFile" | Name of an audio file related to the image data. |
| static const char *OHOS_IMAGE_PROPERTY_FLASH_ENERGY = "FlashEnergy" | Strobe energy at the time the image was captured, in Beam Candle Power Seconds (BCPS). |
| static const char *OHOS_IMAGE_PROPERTY_SPATIAL_FREQUENCY_RESPONSE = "SpatialFrequencyResponse" | Spatial frequency table of the camera or input device. |
| static const char *OHOS_IMAGE_PROPERTY_FOCAL_PLANE_X_RESOLUTION = "FocalPlaneXResolution" | Number of pixels in the image width (X) direction per FocalPlaneResolutionUnit. |
| static const char *OHOS_IMAGE_PROPERTY_FOCAL_PLANE_Y_RESOLUTION = "FocalPlaneYResolution" | Number of pixels in the image height (Y) direction per FocalPlaneResolutionUnit. |
| static const char *OHOS_IMAGE_PROPERTY_FOCAL_PLANE_RESOLUTION_UNIT = "FocalPlaneResolutionUnit" | Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution. |
| static const char *OHOS_IMAGE_PROPERTY_SUBJECT_LOCATION = "SubjectLocation" | Location of the main subject relative to the left edge. |
| static const char *OHOS_IMAGE_PROPERTY_EXPOSURE_INDEX = "ExposureIndex" | Exposure index selected at the time the image is captured. |
| static const char *OHOS_IMAGE_PROPERTY_SENSING_METHOD = "SensingMethod" | Type of the image sensor on the camera. |
| static const char *OHOS_IMAGE_PROPERTY_FILE_SOURCE = "FileSource" | Image source. |
| static const char *OHOS_IMAGE_PROPERTY_CFA_PATTERN = "CFAPattern" | Color Filter Array (CFA) geometric pattern of the image sensor. |
| static const char *OHOS_IMAGE_PROPERTY_CUSTOM_RENDERED = "CustomRendered" | Special processing on image data. |
| static const char *OHOS_IMAGE_PROPERTY_EXPOSURE_MODE = "ExposureMode" | Exposure mode set when the image was captured. |
| static const char *OHOS_IMAGE_PROPERTY_DIGITAL_ZOOM_RATIO = "DigitalZoomRatio" | Digital zoom ratio when the image was captured. |
| static const char *OHOS_IMAGE_PROPERTY_SCENE_CAPTURE_TYPE = "SceneCaptureType" | Type of the scene that was captured. |
| static const char *OHOS_IMAGE_PROPERTY_GAIN_CONTROL = "GainControl" | Degree of overall image gain adjustment. |
| static const char *OHOS_IMAGE_PROPERTY_CONTRAST = "Contrast" | Direction of contrast processing used by the camera. |
| static const char *OHOS_IMAGE_PROPERTY_SATURATION = "Saturation" | Direction of saturation processing used by the camera. |
| static const char *OHOS_IMAGE_PROPERTY_SHARPNESS = "Sharpness" | Direction of sharpness processing used by the camera. |
| static const char *OHOS_IMAGE_PROPERTY_DEVICE_SETTING_DESCRIPTION = "DeviceSettingDescription" | Information about the photographing conditions of a specific camera model. |
| static const char *OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE_RANGE = "SubjectDistanceRange" | Distance to the subject. |
| static const char *OHOS_IMAGE_PROPERTY_IMAGE_UNIQUE_ID = "ImageUniqueID" | Unique identifier assigned to each image. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_VERSION_ID = "GPSVersionID" | Version of GPSInfoIFD. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_ALTITUDE_REF = "GPSAltitudeRef" | Whether the latitude is north or south latitude. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_ALTITUDE = "GPSAltitude" | Altitude based on the reference in GPSAltitudeRef. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_SATELLITES = "GPSSatellites" | GPS satellites used for measurement. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_STATUS = "GPSStatus" | Status of the GPS receiver when the image was recorded. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_MEASURE_MODE = "GPSMeasureMode" | GPS measurement pmode. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_DOP = "GPSDOP" | GPS DOP (data degree of precision) |
| static const char *OHOS_IMAGE_PROPERTY_GPS_SPEED_REF = "GPSSpeedRef" | Unit used to express the movement speed of the GPS receiver. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_SPEED = "GPSSpeed" | Movement speed of the GPS receiver. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_TRACK_REF = "GPSTrackRef" | Reference of the movement direction of the GPS receiver. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_TRACK = "GPSTrack" | Movement direction of the GPS receiver. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION_REF = "GPSImgDirectionRef" | Reference of the direction of the image when it was captured. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION = "GPSImgDirection" | Direction of the image when it was captured. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_MAP_DATUM = "GPSMapDatum" | Geodetic survey data used by the GPS receiver. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE_REF = "GPSDestLatitudeRef" | Whether the latitude of the destination point is north or south latitude. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE = "GPSDestLatitude" | Latitude of the destination point. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE_REF = "GPSDestLongitudeRef" | Whether the longitude of the destination point is east or west longitude. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_PROCESSING_METHOD = "GPSProcessingMethod" | String that records the name of the method used for positioning. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_AREA_INFORMATION = "GPSAreaInformation" | String that records the name of the GPS area. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_DIFFERENTIAL = "GPSDifferential" | Whether differential correction is applied to the GPS receiver. It is critical to accurate location accuracy. |
| static const char *OHOS_IMAGE_PROPERTY_BODY_SERIAL_NUMBER = "BodySerialNumber" | Serial number of the camera body. |
| static const char *OHOS_IMAGE_PROPERTY_CAMERA_OWNER_NAME = "CameraOwnerName" | Name of the camera owner. |
| static const char *OHOS_IMAGE_PROPERTY_COMPOSITE_IMAGE = "CompositeImage" | Whether the image is a composite image. |
| static const char *OHOS_IMAGE_PROPERTY_DNG_VERSION = "DNGVersion" | DNG version. It encodes the DNG 4-tier version number. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE = "GPSDestLongitude" | Longitude of the destination point. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING_REF = "GPSDestBearingRef" | Reference of the bearing to the destination point. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING = "GPSDestBearing" | Bearing to the destination point. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE_REF = "GPSDestDistanceRef" | Unit used to express the distance to the destination point. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE = "GPSDestDistance" | Distance to the destination point. |
| static const char *OHOS_IMAGE_PROPERTY_DEFAULT_CROP_SIZE = "DefaultCropSize" | Size of the final image area, in raw image coordinates, taking into account extra pixels around the edges of the final image. |
| static const char *OHOS_IMAGE_PROPERTY_GAMMA = "Gamma" | Gamma value. |
| static const char *OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEYYY = "ISOSpeedLatitudeyyy" | ISO speed latitude yyy value of the camera or input device, which is defined in ISO 12232. |
| static const char *OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEZZZ = "ISOSpeedLatitudezzz" | ISO speed latitude zzz value of the camera or input device, which is defined in ISO 12232. |
| static const char *OHOS_IMAGE_PROPERTY_LENS_MAKE = "LensMake" | Manufacturer of the lens. |
| static const char *OHOS_IMAGE_PROPERTY_LENS_MODEL = "LensModel" | Model of the lens. |
| static const char *OHOS_IMAGE_PROPERTY_LENS_SERIAL_NUMBER = "LensSerialNumber" | Serial number of the lens. |
| static const char *OHOS_IMAGE_PROPERTY_LENS_SPECIFICATION = "LensSpecification" | Specifications of the lens. |
| static const char *OHOS_IMAGE_PROPERTY_NEW_SUBFILE_TYPE = "NewSubfileType" | Data type of a subfile, such as a full-resolution image, a thumbnail, or a part of a multi-frame image. The value is a bit mask. The value 0 indicates a full-resolution image, 1 indicates a thumbnail, and 2 indicates a part of a multi-frame image. |
| static const char *OHOS_IMAGE_PROPERTY_OFFSET_TIME = "OffsetTime" | Time with an offset from UTC when the image was captured, in the format of ±HH:MM. |
| static const char *OHOS_IMAGE_PROPERTY_OFFSET_TIME_DIGITIZED = "OffsetTimeDigitized" | Time with an offset from UTC when the image was digitized. It helps to accurately adjust the timestamp. |
| static const char *OHOS_IMAGE_PROPERTY_OFFSET_TIME_ORIGINAL = "OffsetTimeOriginal" | Time with an offset from UTC when the original image was created. It is critical for time-sensitive applications. |
| static const char *OHOS_IMAGE_PROPERTY_SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE = "SourceExposureTimesOfCompositeImage" | Exposure time of source images of the composite image. |
| static const char *OHOS_IMAGE_PROPERTY_SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE = "SourceImageNumberOfCompositeImage" | Number of source images of the composite image. |
| static const char *OHOS_IMAGE_PROPERTY_SUBFILE_TYPE = "SubfileType" | Type of data contained in this subfile. This tag has been deprecated. Use NewSubfileType instead. |
| static const char *OHOS_IMAGE_PROPERTY_GPS_H_POSITIONING_ERROR = "GPSHPositioningError" | Horizontal positioning error, in meters. |
| static const char *OHOS_IMAGE_PROPERTY_PHOTOGRAPHIC_SENSITIVITY = "PhotographicSensitivity" | Sensitivity of the camera or input device when the image was captured. |
| static const char *OHOS_IMAGE_PROPERTY_BURST_NUMBER = "HwMnoteBurstNumber" | Number of burst shooting times. |
| static const char *OHOS_IMAGE_PROPERTY_FACE_CONF = "HwMnoteFaceConf" | Face confidence. |
| static const char *OHOS_IMAGE_PROPERTY_FACE_LEYE_CENTER = "HwMnoteFaceLeyeCenter" | Left eye centered. It is used in OH_ImageSource_GetImageProperty and OH_ImageSource_ModifyImageProperty. |
| static const char *OHOS_IMAGE_PROPERTY_FACE_MOUTH_CENTER = "HwMnoteFaceMouthCenter" | Mouth centered. |
| static const char *OHOS_IMAGE_PROPERTY_FACE_POINTER = "HwMnoteFacePointer" | Face pointer. |
| static const char *OHOS_IMAGE_PROPERTY_FACE_RECT = "HwMnoteFaceRect" | Face rectangle. |
| static const char *OHOS_IMAGE_PROPERTY_FACE_REYE_CENTER = "HwMnoteFaceReyeCenter" | Right eye centered. |
| static const char *OHOS_IMAGE_PROPERTY_FACE_SMILE_SCORE = "HwMnoteFaceSmileScore" | Smile score of for faces. |
| static const char *OHOS_IMAGE_PROPERTY_FACE_VERSION = "HwMnoteFaceVersion" | Facial recognition algorithm version. |
| static const char *OHOS_IMAGE_PROPERTY_FRONT_CAMERA = "HwMnoteFrontCamera" | Whether the front camera is used to take a selfie. |
| static const char *OHOS_IMAGE_PROPERTY_SCENE_POINTER = "HwMnoteScenePointer" | Pointer to the scene. |
| static const char *OHOS_IMAGE_PROPERTY_SCENE_VERSION = "HwMnoteSceneVersion" | Scene algorithm version. |
| static const char *OHOS_IMAGE_PROPERTY_GIF_LOOP_COUNT = "GIFLoopCount" | Number of GIF loops. |
typedef struct Image_String Image_MimeType
Description
Defines a struct for an image format type.
Since: 12
typedef struct Image_Region Image_Region
Description
Defines a struct for the region of an image to decode.
Since: 12
typedef struct Image_Size Image_Size
Description
Defines a struct for the image size.
Since: 12
typedef struct Image_String Image_String
Description
Defines a struct for an image string.
Since: 12
typedef struct OH_DecodingOptions OH_DecodingOptions
Description
Defines a struct for decoding parameters, which are used in OH_ImageSourceNative_CreatePixelmap.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_DecodingOptions Struct.
Since: 12
typedef struct OH_ImageNative OH_ImageNative
Description
Defines the alias for an image object at the native layer.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_ImageNative Struct.
Since: 12
typedef struct OH_ImagePackerNative OH_ImagePackerNative
Description
Defines a struct for the image packer, which is used to perform operations related to an image packer.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_ImagePackerNative Struct.
Since: 12
typedef void(*OH_ImageReceiver_OnCallback) (OH_ImageReceiverNative *receiver)
Description
Defines the callbacks for the image receiver at the native layer.
Since: 12
typedef struct OH_ImageReceiverNative OH_ImageReceiverNative
Description
Defines the data type name of the image receiver at the native layer.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_ImageReceiverNative Struct.
Since: 12
typedef struct OH_ImageReceiverOptionsOH_ImageReceiverOptions
Description
Defines the data type name of the image receiver options.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_ImageReceiverOptions Struct.
Since: 12
typedef struct OH_Pixelmap_HdrDynamicMetadata OH_Pixelmap_HdrDynamicMetadata
Description
Defines a struct for the dynamic metadata values available for the key DR_DYNAMIC_METADATA.
Since: 12
typedef struct OH_Pixelmap_HdrGainmapMetadata OH_Pixelmap_HdrGainmapMetadata
Description
Defines a struct for the gain map metadata values available for the key HDR_GAINMAP_METADATA. For details, see ISO 21496-1.
Since: 12
typedef struct OH_Pixelmap_HdrMetadataValue OH_Pixelmap_HdrMetadataValue
Description
Defines a struct for the HDR metadata values used by the PixelMap and available for the key OH_Pixelmap_HdrMetadataKey.
It is used in OH_PixelmapNative_SetMetadata and OH_PixelmapNative_GetMetadata.
Since: 12
typedef struct OH_Pixelmap_HdrStaticMetadata OH_Pixelmap_HdrStaticMetadata
Description
The OH_Pixelmap_HdrStaticMetadata struct describes the static metadata values available for the key HDR_STATIC_METADATA.
Since: 12
typedef struct OH_ImageSource_Info OH_ImageSource_Info
Description
Defines a struct for the image source information, which is created by calling OH_ImageSourceInfo_Create.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_ImageSource_Info Struct.
Since: 12
typedef struct OH_ImageSourceNative OH_ImageSourceNative
Description
Defines a struct for the image source, which is used to perform operations related to an image source.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_ImageSourceNative Struct.
Since: 12
typedef struct OH_PackingOptions OH_PackingOptions
Description
Defines a struct for image encoding parameters.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_PackingOptions Struct.
Since: 12
typedef struct OH_Pixelmap_ImageInfo OH_Pixelmap_ImageInfo
Description
Defines a struct for the image information.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_Pixelmap_ImageInfo Struct.
Since: 12
typedef struct OH_Pixelmap_InitializationOptions OH_Pixelmap_InitializationOptions
Description
Defines a struct for the initialization parameters.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_Pixelmap_InitializationOptions Struct.
Since: 12
typedef struct OH_PixelmapNative OH_PixelmapNative
Description
Defines a struct for the PixelMap, which is used to perform operations related to a PixelMap.
The fields in this struct cannot be directly operated. Instead, they must be manipulated via function calls. For details about the struct content and operation mode, see OH_PixelmapNative Struct.
Since: 12
typedef struct OH_NativeBuffer OH_NativeBuffer
Description
Defines a struct for the native buffer, which is used to perform operations related to the native buffer.
Since: 12
enum IMAGE_DYNAMIC_RANGE
Description
Enumerates the desired dynamic range for decoding.
Since: 12
| Value | Description |
|---|---|
| IMAGE_DYNAMIC_RANGE_AUTO | Adaptive processing. |
| IMAGE_DYNAMIC_RANGE_SDR | Standard dynamic range (SDR). |
| IMAGE_DYNAMIC_RANGE_HDR | High dynamic range (HDR). |
enum Image_ErrorCode
Description
Enumerates the error codes.
Since: 12
| Value | Description |
|---|---|
| IMAGE_SUCCESS | Operation successful. |
| IMAGE_BAD_PARAMETER | Invalid parameter. |
| IMAGE_UNSUPPORTED_MIME_TYPE | Unsupported MIME type. |
| IMAGE_UNKNOWN_MIME_TYPE | Unknown MIME type. |
| IMAGE_TOO_LARGE | The data or image is too large. |
| IMAGE_DMA_NOT_EXIST | The memory is not the DMA memory. |
| IMAGE_DMA_OPERATION_FAILED | The operation on the DMA memory fails. |
| IMAGE_UNSUPPORTED_OPERATION | Unsupported operation. |
| IMAGE_UNSUPPORTED_METADATA | Unsupported metadata. |
| IMAGE_UNSUPPORTED_CONVERSION | Unsupported conversion. |
| IMAGE_INVALID_REGION | Invalid region. |
| IMAGE_ALLOC_FAILED | Failed to allocate the memory. |
| IMAGE_COPY_FAILED | Failed to copy the memory. |
| IMAGE_UNKNOWN_ERROR | Unknown error. |
| IMAGE_BAD_SOURCE | Abnormal data source. |
| IMAGE_DECODE_FAILED | Decoding failed. |
| IMAGE_ENCODE_FAILED | Encoding failed. |
enum IMAGE_PACKER_DYNAMIC_RANGE
Description
Enumerates the desired dynamic range for encoding.
Since: 12
| Value | Description |
|---|---|
| IMAGE_PACKER_DYNAMIC_RANGE_AUTO | Adaptive processing. |
| IMAGE_PACKER_DYNAMIC_RANGE_SDR | SDR. |
enum PIXEL_FORMAT
Description
Enumerates the image pixel formats.
Since: 12
| Value | Description |
|---|---|
| PIXEL_FORMAT_UNKNOWN | Unknown format. |
| PIXEL_FORMAT_RGB_565 | RGB_565 format. |
| PIXEL_FORMAT_RGBA_8888 | RGBA_8888 format. |
| PIXEL_FORMAT_BGRA_8888 | BGRA_8888 format. |
| PIXEL_FORMAT_RGB_888 | RGB_888 format. |
| PIXEL_FORMAT_ALPHA_8 | ALPHA_8 format. |
| PIXEL_FORMAT_RGBA_F16 | RGBA_F16 format. |
| PIXEL_FORMAT_NV21 | NV21 format. |
| PIXEL_FORMAT_NV12 | NV12 format. |
| PIXEL_FORMAT_RGBA_1010102 | RGBA_1010102 format. |
| PIXEL_FORMAT_YCBCR_P010 | YCBCR_P010 format. |
| PIXEL_FORMAT_YCRCB_P010 | YCRCB_P010 format. |
enum OH_Pixelmap_HdrMetadataKey
Description
Enumerates the keys of the HDR related metadata information used by the PixelMap. It is used in OH_PixelmapNative_SetMetadata and OH_PixelmapNative_GetMetadata.
Since: 12
| Value | Description |
|---|---|
| HDR_METADATA_TYPE | Metadata type used by the PixelMap. |
| HDR_STATIC_METADATA | Static metadata. |
| HDR_DYNAMIC_METADATA | Dynamic metadata. |
| HDR_GAINMAP_METADATA | Metadata used by gain maps. |
enum OH_Pixelmap_HdrMetadataType
Description
Enumerates the HDR metadata types, which are the values of HDR_METADATA_TYPE.
Since: 12
| Value | Description |
|---|---|
| HDR_METADATA_TYPE_NONE | No metadata. |
| HDR_METADATA_TYPE_BASE | Metadata used for base graphics. |
| HDR_METADATA_TYPE_GAINMAP | Metadata used for gain maps. |
| HDR_METADATA_TYPE_ALTERNATE | Metadata used for synthesized HDR graphics. |
enum OH_PixelmapNative_AntiAliasingLevel
Description
Enumerates the antialiasing levels used for scaling PixelMaps.
Since: 12
| Value | Description |
|---|---|
| OH_PixelmapNative_AntiAliasing_NONE | Nearest neighbor interpolation. |
| OH_PixelmapNative_AntiAliasing_LOW | Bilinear interpolation. |
| OH_PixelmapNative_AntiAliasing_MEDIUM | Bilinear interpolation with mipmap enabled. You are advised to use this value when zooming out an image. |
| OH_PixelmapNative_AntiAliasing_HIGH | Cubic interpolation. |
enum PIXELMAP_ALPHA_TYPE
Description
Enumerates the alpha types of a PixelMap.
Since: 12
| Value | Description |
|---|---|
| PIXELMAP_ALPHA_TYPE_UNKNOWN | Unknown format. |
| PIXELMAP_ALPHA_TYPE_OPAQUE | Opaque format. |
| PIXELMAP_ALPHA_TYPE_PREMULTIPLIED | Premultiplied format. |
| PIXELMAP_ALPHA_TYPE_UNPREMULTIPLIED | Non-premultiplied format. |
Image_ErrorCode OH_DecodingOptions_Create (OH_DecodingOptions ** options)
Description
Creates the pointer to an OH_DecodingOptions struct.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Double pointer to the OH_DecodingOptions struct created. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_GetDesiredDynamicRange (OH_DecodingOptions * options, int32_t * desiredDynamicRange )
Description
Obtains the desired dynamic range configured during decoding.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| desiredDynamicRange | Pointer to the desired dynamic range. For details about the available options, see IMAGE_DYNAMIC_RANGE. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_GetDesiredRegion (OH_DecodingOptions * options, Image_Region * desiredRegion )
Description
Obtains the region to decode.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| desiredRegion | Pointer to the region to decode. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_GetDesiredSize (OH_DecodingOptions * options, Image_Size * desiredSize )
Description
Obtains the desired output size.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| desiredSize | Pointer to the desired output size. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_GetIndex (OH_DecodingOptions * options, uint32_t * index )
Description
Obtains the index of an image.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| index | Pointer to the index of the image to decode. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_GetPixelFormat (OH_DecodingOptions * options, int32_t * pixelFormat )
Description
Obtains the pixel format.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| pixelFormat | Pointer to the pixel format. For details about the available options, see PIXEL_FORMAT. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_GetRotate (OH_DecodingOptions * options, float * rotate )
Description
Obtains the rotation degree.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| rotate | Pointer to the angle to rotate, in degrees. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_Release (OH_DecodingOptions * options)
Description
Releases the pointer to an OH_DecodingOptions struct.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_SetDesiredDynamicRange (OH_DecodingOptions * options, int32_t desiredDynamicRange )
Description
Sets the desired dynamic range during decoding.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| desiredDynamicRange | Desired dynamic range. For details about the available options, see IMAGE_DYNAMIC_RANGE. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_SetDesiredRegion (OH_DecodingOptions * options, Image_Region * desiredRegion )
Description
Sets the region to decode.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| desiredRegion | Pointer to the region to decode. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_SetDesiredSize (OH_DecodingOptions * options, Image_Size * desiredSize )
Description
Sets the desired output size.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| desiredSize | Pointer to the desired output size. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_SetIndex (OH_DecodingOptions * options, uint32_t index )
Description
Sets the index for an image.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| index | Index of the image to decode. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_SetPixelFormat (OH_DecodingOptions * options, int32_t pixelFormat )
Description
Sets the pixel format.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| pixelFormat | Pixel format. For details about the available options, see PIXEL_FORMAT. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_DecodingOptions_SetRotate (OH_DecodingOptions * options, float rotate )
Description
Sets the rotation angle.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_DecodingOptions struct. |
| rotate | Angle to rotate, in degrees. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageNative_GetBufferSize (OH_ImageNative * image, uint32_t componentType, size_t * size )
Description
Obtains the size of the buffer corresponding to a component type in a native OH_ImageNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| image | Pointer to a native OH_ImageNative object. |
| componentType | Component type. |
| size | Pointer to the size of the buffer. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageNative_GetByteBuffer (OH_ImageNative * image, uint32_t componentType, OH_NativeBuffer ** nativeBuffer )
Description
Obtains the buffer corresponding to a component type in a native OH_ImageNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| image | Pointer to a native OH_ImageNative object. |
| componentType | Component type. |
| nativeBuffer | Double pointer to the buffer, which is an OH_NativeBuffer object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageNative_GetComponentTypes (OH_ImageNative * image, uint32_t ** types, size_t * typeSize )
Description
Obtains the component types of a native OH_ImageNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| image | Pointer to a native OH_ImageNative object. |
| types | Double pointer to the component types obtained. |
| typeSize | Pointer to the number of component types obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageNative_GetImageSize (OH_ImageNative * image, Image_Size * size )
Description
Obtains the Image_Size information of a native OH_ImageNative object.
If the OH_ImageNative object stores the camera preview stream data (YUV image data), the width and height in Image_Size obtained correspond to those of the YUV image. If the OH_ImageNative object stores the camera photo stream data (JPEG image data, which is already encoded), the width in Image_Size obtained is the JPEG data size, and the height is 1. The type of data stored in the OH_ImageNative object depends on whether the application passes the surface ID in the receiver to a previewOutput or captureOutput object of the camera.
Since: 12
Parameters
| Name | Description |
|---|---|
| image | Pointer to a native OH_ImageNative object. |
| size | Pointer to the Image_Size object obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNKNOWN_ERROR if an unknown error occurs. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageNative_GetPixelStride (OH_ImageNative * image, uint32_t componentType, int32_t * pixelStride )
Description
Obtains the pixel stride corresponding to a component type in a native OH_ImageNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| image | Pointer to a native OH_ImageNative object. |
| componentType | Component type. |
| pixelStride | Pointer to the pixel stride obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageNative_GetRowStride (OH_ImageNative * image, uint32_t componentType, int32_t * rowStride )
Description
Obtains the row stride corresponding to a component type in a native OH_ImageNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| image | Pointer to a native OH_ImageNative object. |
| componentType | Component type. |
| rowStride | Pointer to the row stride obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageNative_GetTimestamp (OH_ImageNative * image, int64_t * timestamp )
Description
Obtains the timestamp of a native OH_ImageNative object.
Timestamps, measured in nanoseconds, are usually monotonically increasing. The specific meaning and baseline of these timestamps are determined by the image producer, which is the camera in the camera preview and photo scenarios. As a result, images from different producers may carry timestamps with distinct meanings and baselines, making direct comparison between them infeasible. To obtain the generation time of a photo, you can use OH_ImageSourceNative_GetImageProperty to read the related EXIF information.
Since: 12
Parameters
| Name | Description |
|---|---|
| image | Pointer to a native OH_ImageNative object. |
| timestamp | Pointer to the timestamp. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageNative_Release (OH_ImageNative * image)
Description
Releases a native OH_ImageNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| image | Pointer to a native OH_ImageNative object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImagePackerNative_Create (OH_ImagePackerNative ** imagePacker)
Description
Creates the pointer to an OH_ImagePackerNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Double pointer to the OH_ImagePackerNative object created. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImagePackerNative_PackToDataFromImageSource (OH_ImagePackerNative * imagePacker, OH_PackingOptions * options, OH_ImageSourceNative * imageSource, uint8_t * outData, size_t * size )
Description
Encodes an image source into data in a given format.
Since: 12
Parameters
| Name | Description |
|---|---|
| imagePacker | Pointer to an OH_ImagePackerNative object. |
| options | Pointer to an OH_PackingOptions struct. |
| imageSource | Pointer to the image source to encode. |
| outData | Pointer to the buffer used to store the output data. |
| size | Pointer to the size of the buffer. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_DECODE_FAILED if image decoding fails; returns IMAGE_ALLOC_FAILED if memory allocation fails; returns IMAGE_TOO_LARGE if the data or image is too large; returns IMAGE_UNKNOWN_ERROR if an unknown error occurs. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImagePackerNative_PackToDataFromPixelmap (OH_ImagePackerNative * imagePacker, OH_PackingOptions * options, OH_PixelmapNative * pixelmap, uint8_t * outData, size_t * size )
Description
Encodes a PixelMap into data in a given format.
Since: 12
Parameters
| Name | Description |
|---|---|
| imagePacker | Pointer to an OH_ImagePackerNative object. |
| options | Pointer to an OH_PackingOptions struct. |
| pixelmap | Pointer to the PixelMap to encode. |
| outData | Pointer to the buffer used to store the output data. |
| size | Pointer to the size of the buffer. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_DECODE_FAILED if image decoding fails; returns IMAGE_ALLOC_FAILED if memory allocation fails; returns IMAGE_TOO_LARGE if the data or image is too large; returns IMAGE_UNKNOWN_ERROR if an unknown error occurs. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImagePackerNative_PackToFileFromImageSource (OH_ImagePackerNative * imagePacker, OH_PackingOptions * options, OH_ImageSourceNative * imageSource, int32_t fd )
Description
Encodes an image source into a file.
Since: 12
Parameters
| Name | Description |
|---|---|
| imagePacker | Pointer to an OH_ImagePackerNative object. |
| options | Pointer to an OH_PackingOptions struct. |
| imageSource | Pointer to the image source to encode. |
| fd | File descriptor, which is writable. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_DECODE_FAILED if image decoding fails; returns IMAGE_UNKNOWN_ERROR if an unknown error occurs. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImagePackerNative_PackToFileFromPixelmap (OH_ImagePackerNative * imagePacker, OH_PackingOptions * options, OH_PixelmapNative * pixelmap, int32_t fd )
Description
Encodes a PixelMap into a file.
Since: 12
Parameters
| Name | Description |
|---|---|
| imagePacker | Pointer to an OH_ImagePackerNative object. |
| options | Pointer to an OH_PackingOptions struct. |
| pixelmap | Pointer to the PixelMap to encode. |
| fd | File descriptor, which is writable. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_DECODE_FAILED if image decoding fails; returns IMAGE_UNKNOWN_ERROR if an unknown error occurs. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImagePackerNative_Release (OH_ImagePackerNative * imagePacker)
Description
Releases the pointer to an OH_ImagePackerNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| imagePacker | Pointer to an OH_ImagePackerNative object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageReceiverNative_Create (OH_ImageReceiverOptions * options, OH_ImageReceiverNative ** receiver )
Description
Creates an OH_ImageReceiverNative object at the application layer.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_ImageReceiverOptions object. |
| receiver | Double pointer to the OH_ImageReceiverNative object created. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_ALLOC_FAILED if memory allocation fails. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageReceiverNative_GetCapacity (OH_ImageReceiverNative * receiver, int32_t * capacity )
Description
Obtains the capacity of an image receiver, which is an OH_ImageReceiverNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| receiver | Pointer to an OH_ImageReceiverNative object. |
| capacity | Pointer to the capacity obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
See
Image_ErrorCode OH_ImageReceiverNative_GetReceivingSurfaceId (OH_ImageReceiverNative * receiver, uint64_t * surfaceId )
Description
Obtains the receiver ID through an OH_ImageReceiverNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| receiver | Pointer to an OH_ImageReceiverNative object. |
| surfaceId | Pointer to the surface ID obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNKNOWN_ERROR if an unknown error occurs. For details, see Image_ErrorCode.
See
Image_ErrorCode OH_ImageReceiverNative_GetSize (OH_ImageReceiverNative * receiver, Image_Size * size )
Description
Obtains the size of an image receiver, which is an OH_ImageReceiverNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| receiver | Pointer to an OH_ImageReceiverNative object. |
| size | Pointer to the Image_Size object obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
See
Image_ErrorCode OH_ImageReceiverNative_Off (OH_ImageReceiverNative * receiver)
Description
Unregisters the callback defined in OH_ImageReceiver_OnCallback.
The callback is registered by calling OH_ImageReceiverNative_On.
Since: 12
Parameters
| Name | Description |
|---|---|
| receiver | Pointer to an OH_ImageReceiverNative object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
See
Image_ErrorCode OH_ImageReceiverNative_On (OH_ImageReceiverNative * receiver, OH_ImageReceiver_OnCallback callback )
Description
Registers the callback defined in OH_ImageReceiver_OnCallback.
This callback is triggered whenever a new image is received.
Since: 12
Parameters
| Name | Description |
|---|---|
| receiver | Pointer to an OH_ImageReceiverNative object. |
| callback | Callback defined in OH_ImageReceiver_OnCallback. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
See
Image_ErrorCode OH_ImageReceiverNative_ReadLatestImage (OH_ImageReceiverNative * receiver, OH_ImageNative ** image )
Description
Obtains the latest image through an OH_ImageReceiverNative object.
This function can be called to receive data only after the OH_ImageReceiver_OnCallback callback is triggered. When the OH_ImageNative object returned by this function is no longer needed, call OH_ImageNative_Release to release the object. New data can be received only after the release.
Since: 12
Parameters
| Name | Description |
|---|---|
| receiver | Pointer to an OH_ImageReceiverNative object. |
| image | Double pointer to the image obtained, which is an OH_ImageNative object at the application layer. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNKNOWN_ERROR if an unknown error occurs; returns IMAGE_ALLOC_FAILED if memory allocation fails. For details, see Image_ErrorCode.
See
Image_ErrorCode OH_ImageReceiverNative_ReadNextImage (OH_ImageReceiverNative * receiver, OH_ImageNative ** image )
Description
Obtains the next image through an OH_ImageReceiverNative object.
This function can be called to receive data only after the OH_ImageReceiver_OnCallback callback is triggered. When the OH_ImageNative object returned by this function is no longer needed, call OH_ImageNative_Release to release the object. New data can be received only after the release.
Since: 12
Parameters
| Name | Description |
|---|---|
| receiver | Pointer to an OH_ImageReceiverNative object. |
| image | Double pointer to the image obtained, which is an OH_ImageNative object at the application layer. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNKNOWN_ERROR if an unknown error occurs; returns IMAGE_ALLOC_FAILED if memory allocation fails. For details, see Image_ErrorCode.
See
Image_ErrorCode OH_ImageReceiverNative_Release (OH_ImageReceiverNative * receiver)
Description
Releases a native OH_ImageReceiverNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| receiver | Pointer to a native OH_ImageReceiverNative object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
See
Image_ErrorCode OH_ImageReceiverOptions_Create (OH_ImageReceiverOptions ** options)
Description
Creates an OH_ImageReceiverOptions object at the application layer.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Double pointer to the OH_ImageReceiverOptions object created. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_ALLOC_FAILED if memory allocation fails. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageReceiverOptions_GetCapacity (OH_ImageReceiverOptions * options, int32_t * capacity )
Description
Obtains the capacity of an OH_ImageReceiverOptions object.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_ImageReceiverOptions object. |
| capacity | Pointer to the capacity obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageReceiverOptions_GetSize (OH_ImageReceiverOptions * options, Image_Size * size )
Description
Obtains the Image_Size information of an OH_ImageReceiverOptions object.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_ImageReceiverOptions object. |
| size | Pointer to the Image_Size object obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageReceiverOptions_Release (OH_ImageReceiverOptions * options)
Description
Releases an OH_ImageReceiverOptions object.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_ImageReceiverOptions object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
See
Image_ErrorCode OH_ImageReceiverOptions_SetCapacity (OH_ImageReceiverOptions * options, int32_t capacity )
Description
Sets the capacity for an OH_ImageReceiverOptions object.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_ImageReceiverOptions object. |
| capacity | Capacity to set. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageReceiverOptions_SetSize (OH_ImageReceiverOptions * options, Image_Size size )
Description
Sets the Image_Size information for an OH_ImageReceiverOptions object.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_ImageReceiverOptions object. |
| size | Image_Size object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceInfo_Create (OH_ImageSource_Info ** info)
Description
Creates the pointer to an OH_ImageSource_Info struct.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Double pointer to the OH_ImageSource_Info struct created. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceInfo_GetDynamicRange (OH_ImageSource_Info * info, bool * isHdr )
Description
Obtains the dynamic range of an image.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_ImageSource_Info struct. |
| isHdr | Pointer to a Boolean that specifies whether the HDR is used. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceInfo_GetHeight (OH_ImageSource_Info * info, uint32_t * height )
Description
Obtains the image height.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_ImageSource_Info struct. |
| height | Pointer to the image height, in px. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceInfo_GetWidth (OH_ImageSource_Info * info, uint32_t * width )
Description
Obtains the image width.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_ImageSource_Info struct. |
| width | Pointer to the image width, in px. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceInfo_Release (OH_ImageSource_Info * info)
Description
Releases the pointer to an OH_ImageSource_Info struct.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_ImageSource_Info struct. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_CreateFromData (uint8_t * data, size_t dataSize, OH_ImageSourceNative ** res )
Description
Creates the pointer to an OH_ImageSourceNative object based on buffer data.
The buffer data must be undecoded. Do not pass the pixel buffer data such as RBGA and YUV. If you want to create a PixelMap based on the pixel buffer data, call OH_PixelmapNative_CreatePixelmap.
Since: 12
Parameters
| Name | Description |
|---|---|
| data | Pointer to the buffer data. |
| dataSize | Size of the buffer. |
| res | Double pointer to the OH_ImageSourceNative object created at the C++ local layer. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_BAD_SOURCE if the data source is abnormal. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_CreateFromFd (int32_t fd, OH_ImageSourceNative ** res )
Description
Creates the pointer to an OH_ImageSourceNative object based on a file descriptor.
Since: 12
Parameters
| Name | Description |
|---|---|
| fd | File descriptor. |
| res | Double pointer to the OH_ImageSourceNative object created at the C++ local layer. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile (RawFileDescriptor * rawFile, OH_ImageSourceNative ** res )
Description
Creates the pointer to an OH_ImageSourceNative object by using the raw file descriptor of an image resource file.
Since: 12
Parameters
| Name | Description |
|---|---|
| rawFile | Pointer to the file descriptor of the raw file. |
| res | Double pointer to the OH_ImageSourceNative object created at the C++ local layer. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_CreateFromUri (char * uri, size_t uriSize, OH_ImageSourceNative ** res )
Description
Creates the pointer to an OH_ImageSourceNative object based on a URI.
Since: 12
Parameters
| Name | Description |
|---|---|
| uri | Pointer to the URI of the image source. Only file URIs or Base64 URIs are accepted. Currently, only absolute paths are supported. |
| uriSize | URI length. |
| res | Double pointer to the OH_ImageSourceNative object created at the C++ local layer. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_BAD_SOURCE if the data source is abnormal. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_CreatePixelmap (OH_ImageSourceNative * source, OH_DecodingOptions * options, OH_PixelmapNative ** pixelmap )
Description
Creates the pointer to an OH_PixelmapNative object based on image decoding parameters.
Since: 12
Parameters
| Name | Description |
|---|---|
| source | Pointer to an OH_ImageSourceNative object. |
| options | Pointer to the image decoding parameters. |
| resPixMap | Double pointer to the OH_PixelmapNative object created at the C++ local layer. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_CreatePixelmapList (OH_ImageSourceNative * source, OH_DecodingOptions * options, OH_PixelmapNative * resVecPixMap[], size_t size )
Description
Creates an array of OH_PixelmapNative objects based on image decoding parameters.
This function decodes all frames at once. If the number of frames is high or the size of individual frames is large, it can lead to significant memory usage. In these cases, you are advised to use the Image component for displaying animations. The Image component decodes frames one by one, which uses less memory than this function.
Since: 12
Parameters
| Name | Description |
|---|---|
| source | Pointer to an OH_ImageSourceNative object. |
| options | Pointer to the image decoding parameters. |
| resVecPixMap | Pointer to an array of OH_PixelmapNative objects created at the C++ local layer. |
| size | Size of the array. You can use OH_ImageSourceNative_GetFrameCount to obtain the size. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNSUPPORTED_OPERATION if the operation is not supported. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_GetDelayTimeList (OH_ImageSourceNative * source, int32_t * delayTimeList, size_t size )
Description
Obtains the image delay time list.
Since: 12
Parameters
| Name | Description |
|---|---|
| source | Pointer to an OH_ImageSourceNative object. |
| delayTimeList | Pointer to the delay time list obtained. It cannot be a null pointer. |
| size | Size of the delay time list. You can use OH_ImageSourceNative_GetFrameCount to obtain the size. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_GetFrameCount (OH_ImageSourceNative * source, uint32_t * frameCount )
Description
Obtains the number of image frames.
Since: 12
Parameters
| Name | Description |
|---|---|
| source | Pointer to an OH_ImageSourceNative object. |
| frameCount | Pointer to the number of frames obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_GetImageInfo (OH_ImageSourceNative * source, int32_t index, OH_ImageSource_Info * info )
Description
Obtains the information about an image with a given index.
Since: 12
Parameters
| Name | Description |
|---|---|
| source | Pointer to an OH_ImageSourceNative object. |
| index | Index of an image. For a GIF image, the value range is [0, N-1], where N indicates the number of GIF frames. For an image with only one frame, you can pass in 0. |
| info | Pointer to the image information obtained, which is an OH_ImageSource_Info struct. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_GetImageProperty (OH_ImageSourceNative * source, Image_String * key, Image_String * value )
Description
Obtains the value of an image property.
Since: 12
Parameters
| Name | Description |
|---|---|
| source | Pointer to an OH_ImageSourceNative object. |
| key | Pointer to the property key. For details, see Image_String. For details about the value range of key, see the definition of OHOS_IMAGE_PROPERTY_XXX. The memory must be released after the image source is used. For details, see OH_ImageSourceNative_Release. |
| 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. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_ModifyImageProperty (OH_ImageSourceNative * source, Image_String * key, Image_String * value )
Description
Modifies the value of an image property.
Since: 12
Parameters
| Name | Description |
|---|---|
| source | Pointer to an OH_ImageSourceNative object. |
| key | Pointer to the property key. For details, see Image_String. key is an EXIF constant. The memory must be released after the image source is used. For details, see OH_ImageSourceNative_Release. |
| value | Pointer to the new value. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_ImageSourceNative_Release (OH_ImageSourceNative * source)
Description
Releases the pointer to an OH_ImageSourceNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| source | Pointer to an OH_ImageSourceNative object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PackingOptions_Create (OH_PackingOptions ** options)
Description
Creates the pointer to an OH_PackingOptions struct.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Double pointer to the OH_PackingOptions struct created. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PackingOptions_GetDesiredDynamicRange (OH_PackingOptions * options, int32_t * desiredDynamicRange )
Description
Obtains the desired dynamic range during encoding.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_PackingOptions struct. |
| desiredDynamicRange | Pointer to the desired dynamic range. For details about the available options, see IMAGE_PACKER_DYNAMIC_RANGE. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PackingOptions_GetMimeType (OH_PackingOptions * options, Image_MimeType * format )
Description
Obtains the MIME type.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_PackingOptions struct. |
| format | Pointer to the image format. 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. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PackingOptions_GetQuality (OH_PackingOptions * options, uint32_t * quality )
Description
Obtains the encoding quality.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_PackingOptions struct. |
| quality | Pointer to the encoding quality. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PackingOptions_Release (OH_PackingOptions * options)
Description
Releases the pointer to an OH_PackingOptions struct.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_PackingOptions struct. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PackingOptions_SetDesiredDynamicRange (OH_PackingOptions * options, int32_t desiredDynamicRange )
Description
Sets the desired dynamic range during encoding.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_PackingOptions struct. |
| desiredDynamicRange | Desired dynamic range. For details about the available options, see IMAGE_PACKER_DYNAMIC_RANGE. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PackingOptions_SetMimeType (OH_PackingOptions * options, Image_MimeType * format )
Description
Sets the MIME type.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_PackingOptions struct. |
| format | Pointer to the image format. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PackingOptions_SetQuality (OH_PackingOptions * options, uint32_t quality )
Description
Sets the encoding quality.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_PackingOptions struct. |
| quality | Encoding quality. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapImageInfo_Create (OH_Pixelmap_ImageInfo ** info)
Description
Creates the pointer to an OH_Pixelmap_ImageInfo struct.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Double pointer to the OH_Pixelmap_ImageInfo struct created. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapImageInfo_GetAlphaType (OH_Pixelmap_ImageInfo * info, int32_t * alphaType )
Description
Obtains the alpha type.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_Pixelmap_ImageInfo struct. |
| alphaType | Pointer to the alpha type. For details about the available options, see PIXELMAP_ALPHA_TYPE. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapImageInfo_GetDynamicRange (OH_Pixelmap_ImageInfo * info, bool * isHdr )
Description
Obtains the dynamic range of a PixelMap.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_Pixelmap_ImageInfo struct. |
| isHdr | Pointer to a Boolean that specifies whether the HDR is used. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapImageInfo_GetHeight (OH_Pixelmap_ImageInfo * info, uint32_t * height )
Description
Obtains the image height.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_Pixelmap_ImageInfo struct. |
| height | Pointer to the image height, in px. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat (OH_Pixelmap_ImageInfo * info, int32_t * pixelFormat )
Description
Obtains the pixel format.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_Pixelmap_ImageInfo struct. |
| pixelFormat | Pointer to the pixel format. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapImageInfo_GetRowStride (OH_Pixelmap_ImageInfo * info, uint32_t * rowStride )
Description
Obtains the row stride.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_Pixelmap_ImageInfo struct. |
| rowStride | Pointer to the row stride, which is the number of bytes from one row of pixels in memory to the next row of pixels in memory. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapImageInfo_GetWidth (OH_Pixelmap_ImageInfo * info, uint32_t * width )
Description
Obtains the image width.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_Pixelmap_ImageInfo struct. |
| width | Pointer to the image width, in px. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapImageInfo_Release (OH_Pixelmap_ImageInfo * info)
Description
Releases the pointer to an OH_Pixelmap_ImageInfo struct.
Since: 12
Parameters
| Name | Description |
|---|---|
| info | Pointer to an OH_Pixelmap_ImageInfo struct. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_Create (OH_Pixelmap_InitializationOptions ** options)
Description
Creates the pointer to an OH_Pixelmap_InitializationOptions struct.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Double pointer to the OH_Pixelmap_InitializationOptions struct created. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_GetAlphaType (OH_Pixelmap_InitializationOptions * options, int32_t * alphaType )
Description
Obtains the alpha type.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| alphaType | Pointer to the alpha type. For details about the available options, see PIXELMAP_ALPHA_TYPE. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_GetHeight (OH_Pixelmap_InitializationOptions * options, uint32_t * height )
Description
Obtains the image height.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| height | Pointer to the image height, in px. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_GetPixelFormat (OH_Pixelmap_InitializationOptions * options, int32_t * pixelFormat )
Description
Obtains the pixel format.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| pixelFormat | Pointer to the pixel format. For details about the available options, see PIXEL_FORMAT. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_GetRowStride (OH_Pixelmap_InitializationOptions * options, int32_t * rowStride )
Description
Obtains the row stride.
The stride is the actual memory size occupied by each row of the image, in bytes. Stride = Width *Number of bytes per pixel + Padding, where padding refers to the extra space added at the end of each row for memory alignment purposes.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| rowStride | Pointer to the stride, in bytes. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNKNOWN_ERROR if the object pointed to by options is released. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_GetSrcPixelFormat(OH_Pixelmap_InitializationOptions *ops, int32_t *srcpixelFormat)
Description
Obtains the source pixel format.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| srcpixelFormat | Pointer to the source pixel format. For details about the available options, see PIXEL_FORMAT. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_GetWidth (OH_Pixelmap_InitializationOptions * options, uint32_t * width )
Description
Obtains the image width.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| width | Pointer to the image width, in px. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_Release (OH_Pixelmap_InitializationOptions * options)
Description
Releases the pointer to an OH_Pixelmap_InitializationOptions struct.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_SetAlphaType (OH_Pixelmap_InitializationOptions * options, int32_t alphaType )
Description
Sets the alpha type.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| alphaType | Alpha type. For details about the available options, see PIXELMAP_ALPHA_TYPE. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_SetHeight (OH_Pixelmap_InitializationOptions * options, uint32_t height )
Description
Sets the image height.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| height | Image height, in px. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_SetPixelFormat (OH_Pixelmap_InitializationOptions * options, int32_t pixelFormat )
Description
Sets the pixel format.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| pixelFormat | Pixel format. For details about the available options, see PIXEL_FORMAT. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_SetRowStride (OH_Pixelmap_InitializationOptions * options, int32_t rowStride )
Description
Sets the row stride.
The stride is the actual memory size occupied by each row of the image, in bytes. Stride = Width *Number of bytes per pixel + Padding, where padding refers to the extra space added at the end of each row for memory alignment purposes.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| rowStride | Pointer to the stride, in bytes. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNKNOWN_ERROR if the object pointed to by options is released. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_SetSrcPixelFormat (OH_Pixelmap_InitializationOptions * options, int32_t srcpixelFormat )
Description
Sets the source pixel format.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| srcpixelFormat | Source pixel format. For details about the available options, see PIXEL_FORMAT. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapInitializationOptions_SetWidth (OH_Pixelmap_InitializationOptions * options, uint32_t width )
Description
Sets the image width.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to an OH_Pixelmap_InitializationOptions struct. |
| width | Image width, in px. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_ConvertAlphaFormat (OH_PixelmapNative * srcpixelmap, OH_PixelmapNative * dstpixelmap, const bool isPremul )
Description
Converts pixel data of a PixelMap from premultiplied alpha to non-premultiplied alpha, or vice versa.
Since: 12
Parameters
| Name | Description |
|---|---|
| srcpixelmap | Pointer to the source PixelMap, which is an OH_PixelmapNative object. |
| dstpixelmap | Pointer to the destination PixelMap, which is an OH_PixelmapNative object. This pointer must be different from the pointer to the source PixelMap. |
| isPremul | Conversion mode. The value true means a conversion from premultiplied alpha to non-premultiplied alpha, and false means a conversion from non-premultiplied alpha to premultiplied alpha. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_ConvertPixelmapNativeFromNapi (napi_env env, napi_value pixelmapNapi, OH_PixelmapNative ** pixelmapNative )
Description
Converts a PixelMapnapi object to a nativePixelMap object.
Since: 12
Parameters
| Name | Description |
|---|---|
| env | Pointer to the NAPI environment. |
| pixelmapNapi | PixelMapnapi object. |
| pixelmapNative | Double pointer to the OH_PixelmapNative object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if pixelmapNative is a null pointer or is not a PixelMapNapi object. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_ConvertPixelmapNativeToNapi (napi_env env, OH_PixelmapNative * pixelmapNative, napi_value * pixelmapNapi )
Description
Converts a nativePixelMap object to a PixelMapnapi object.
Since: 12
Parameters
| Name | Description |
|---|---|
| env | Pointer to the NAPI environment. |
| pixelmapNative | Pointer to an OH_PixelmapNative object. |
| pixelmapNapi | Double pointer to the PixelMapnapi object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if pixelmapNative is null. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_CreateEmptyPixelmap (OH_Pixelmap_InitializationOptions * options, OH_PixelmapNative ** pixelmap )
Description
Creates an empty PixelMap using OH_Pixelmap_InitializationOptions. The memory data is 0.
Since: 12
Parameters
| Name | Description |
|---|---|
| options | Pointer to the properties. |
| pixelmap | Double pointer to the OH_PixelmapNative object created. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_CreatePixelmap (uint8_t * data, size_t dataLength, OH_Pixelmap_InitializationOptions * options, OH_PixelmapNative ** pixelmap )
Description
Creates a PixelMap based on properties. By default, the BGRA_8888 format is used for data processing. For details about other formats, see OH_PixelmapInitializationOptions_SetSrcPixelFormat.
Since: 12
Parameters
| Name | Description |
|---|---|
| data | Pointer to the color array in BGRA_8888 format. |
| dataLength | Size of the array. |
| options | Pointer to the properties. |
| pixelmap | Double pointer to the OH_PixelmapNative object created. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNSUPPORTED_OPERATION if the operation is not supported. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_Crop (OH_PixelmapNative * pixelmap, Image_Region * region )
Description
Crops a PixelMap based on a given size.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| region | Pointer to the region of the image after cropping. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_Flip (OH_PixelmapNative * pixelmap, bool shouldFilpHorizontally, bool shouldFilpVertically )
Description
Flips a PixelMap based on a given angle.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| shouldFilpHorizontally | Whether to flip the image horizontally. |
| shouldFilpVertically | Whether to flip the image vertically. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_GetImageInfo (OH_PixelmapNative * pixelmap, OH_Pixelmap_ImageInfo * imageInfo )
Description
Obtains the image information of a PixelMap.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| imageInfo | Pointer to the image information. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_GetMetadata (OH_PixelmapNative * pixelmap, OH_Pixelmap_HdrMetadataKey key, OH_Pixelmap_HdrMetadataValue ** value )
Description
Obtains the metadata.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| key | Metadata key. For details, see OH_Pixelmap_HdrMetadataKey. |
| value | Double pointer to the value of the metadata key. For details, see OH_Pixelmap_HdrMetadataValue. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_DMA_NOT_EXIST if the DMA memory does not exist; returns IMAGE_COPY_FAILED if the memory copy fails. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_GetNativeBuffer (OH_PixelmapNative * pixelmap, OH_NativeBuffer ** nativeBuffer )
Description
Obtains the NativeBuffer object from a PixelMap in the DMA memory.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to the PixelMap. |
| nativeBuffer | Double pointer to the NativeBuffer object obtained. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_DMA_NOT_EXIST if the memory is not the DMA memory; returns IMAGE_DMA_OPERATION_FAILED if the operation on the DMA memory fails. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_Opacity (OH_PixelmapNative * pixelmap, float rate )
Description
Sets the opacity rate to enable the PixelMap to achieve the corresponding opacity effect.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| rate | Opacity rate to set. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_ReadPixels (OH_PixelmapNative * pixelmap, uint8_t * destination, size_t * bufferSize )
Description
Reads the pixels of a PixelMap and writes the result to the buffer based on the pixel format of the PixelMap.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| destination | Pointer to the buffer to which the pixels will be written. |
| bufferSize | Pointer to the buffer size. The buffer size of the RGBA format is equal to width * height * 4, and the buffer size of the NV21 and NV12 formats is equal to width * height+((width+1)/2) * ((height+1)/2) * 2. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNKNOWN_ERROR if an unknown error occurs. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_Release (OH_PixelmapNative * pixelmap)
Description
Releases the pointer to an OH_PixelmapNative object.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_Rotate (OH_PixelmapNative * pixelmap, float angle )
Description
Rotates a PixelMap based on a given angle.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| angle | Image rotation angle, in degrees. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_Scale (OH_PixelmapNative * pixelmap, float scaleX, float scaleY )
Description
Scales a PixelMap based on a given width and height.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| scaleX | Scale ratio of the width. |
| scaleY | Scale ratio of the height. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_ScaleWithAntiAliasing (OH_PixelmapNative * pixelmap, float scaleX, float scaleY, OH_PixelmapNative_AntiAliasingLevel level )
Description
Scales a PixelMap based on the specified antialiasing level, width, and height.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| scaleX | Scale ratio of the width. |
| scaleY | Scale ratio of the height. |
| level | Antialiasing level. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_TOO_LARGE if the image is too large; returns IMAGE_ALLOC_FAILED if memory allocation fails; returns IMAGE_UNKNOWN_ERROR if the object pointed to by pixelmap is released. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_SetMetadata (OH_PixelmapNative * pixelmap, OH_Pixelmap_HdrMetadataKey key, OH_Pixelmap_HdrMetadataValue * value )
Description
Sets the metadata.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| key | Metadata key. For details, see OH_Pixelmap_HdrMetadataKey. |
| value | Pointer to the value of the metadata key. For details, see OH_Pixelmap_HdrMetadataValue. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_DMA_NOT_EXIST if the DMA memory does not exist; returns IMAGE_COPY_FAILED if the memory copy fails. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_ToSdr (OH_PixelmapNative * pixelmap)
Description
Converts a PixelMap from the HDR format to the SDR format.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNSUPPORTED_OPERATION if the operation is not supported. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_Translate (OH_PixelmapNative * pixelmap, float x, float y )
Description
Translates a PixelMap based on given coordinates.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| x | X coordinate to translate. |
| y | Y coordinate to translate. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect. For details, see Image_ErrorCode.
Image_ErrorCode OH_PixelmapNative_WritePixels (OH_PixelmapNative * pixelmap, uint8_t * source, size_t bufferSize )
Description
Reads the pixels in the buffer and writes the result to the PixelMap based on the pixel format of the PixelMap.
Since: 12
Parameters
| Name | Description |
|---|---|
| pixelmap | Pointer to an OH_PixelmapNative object. |
| source | Pointer to the buffer from which the pixels will be read. |
| bufferSize | Buffer size. |
Returns
Returns IMAGE_SUCCESS if the operation is successful; returns IMAGE_BAD_PARAMETER if a parameter is incorrect; returns IMAGE_UNSUPPORTED_OPERATION if the operation is not supported; returns IMAGE_UNKNOWN_ERROR if an unknown error occurs. For details, see Image_ErrorCode.
static const char* MIME_TYPE_BMP = "image/bmp"
Description
BMP image format.
Since: 12
static const char* MIME_TYPE_GIF = "image/gif"
Description
GIF image format.
Since: 12
static const char* MIME_TYPE_HEIC = "image/heic"
Description
HEIF image format.
Since: 12
static const char* MIME_TYPE_ICON = "image/x-icon"
Description
ICO image format.
Since: 12
static const char* MIME_TYPE_JPEG = "image/jpeg"
Description
JPEG image format.
Since: 12
static const char* MIME_TYPE_PNG = "image/png"
Description
PNG image format.
Since: 12
static const char* MIME_TYPE_WEBP = "image/webp"
Description
WebP image format.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_ARTIST = "Artist"
Description
Person who created the image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = "BitsPerSample"
Description
Number of bits per sample.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_BODY_SERIAL_NUMBER = "BodySerialNumber"
Description
Serial number of the camera body.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_BRIGHTNESS_VALUE = "BrightnessValue"
Description
Value of brightness, expressed in APEX values.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_BURST_NUMBER = "HwMnoteBurstNumber"
Description
Number of burst shooting times.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_CAMERA_OWNER_NAME = "CameraOwnerName"
Description
Name of the camera owner.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_CFA_PATTERN = "CFAPattern"
Description
Color Filter Array (CFA) geometric pattern of the image sensor.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_COLOR_SPACE = "ColorSpace"
Description
Color space information, which is usually recorded as a color space specifier.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_COMPONENTS_CONFIGURATION = "ComponentsConfiguration"
Description
Specific information about compressed data.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_COMPOSITE_IMAGE = "CompositeImage"
Description
Whether the image is a composite image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = "CompressedBitsPerPixel"
Description
Number of bits per pixel. It is specific to compressed data.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_COMPRESSION = "Compression"
Description
Compression scheme used on the image data.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_CONTRAST = "Contrast"
Description
Direction of contrast processing used by the camera.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_COPYRIGHT = "Copyright"
Description
Copyright notice of the image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_CUSTOM_RENDERED = "CustomRendered"
Description
Special processing on image data.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_DATE_TIME_DIGITIZED = "DateTimeDigitized"
Description
Date and time when the image was stored as digital data, in the format of YYYY:MM:DD HH:MM:SS.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = "DateTimeOriginal"
Description
Shooting time, for example, 2022:09:06 15:48:00.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_DEFAULT_CROP_SIZE = "DefaultCropSize"
Description
Size of the final image area, in raw image coordinates, taking into account extra pixels around the edges of the final image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_DEVICE_SETTING_DESCRIPTION = "DeviceSettingDescription"
Description
Information about the photographing conditions of a specific camera model.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_DIGITAL_ZOOM_RATIO = "DigitalZoomRatio"
Description
Digital zoom ratio when the image was captured.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_DNG_VERSION = "DNGVersion"
Description
DNG version. It encodes the DNG 4-tier version number.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_EXIF_VERSION = "ExifVersion"
Description
Version of the supported EXIF standard.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_EXPOSURE_INDEX = "ExposureIndex"
Description
Exposure index selected at the time the image is captured.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_EXPOSURE_MODE = "ExposureMode"
Description
Exposure mode set when the image was captured.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_EXPOSURE_PROGRAM = "ExposureProgram"
Description
Class of the program used by the camera to set exposure when the image was captured.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = "ExposureTime"
Description
Exposure time, for example, 1/33 seconds.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_F_NUMBER = "FNumber"
Description
F number, for example, f/1.8.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FACE_CONF = "HwMnoteFaceConf"
Description
Face confidence.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FACE_LEYE_CENTER = "HwMnoteFaceLeyeCenter"
Description
Left eye centered. It is used in OH_ImageSource_GetImageProperty and OH_ImageSource_ModifyImageProperty.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FACE_MOUTH_CENTER = "HwMnoteFaceMouthCenter"
Description
Mouth centered.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FACE_POINTER = "HwMnoteFacePointer"
Description
Face pointer.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FACE_RECT = "HwMnoteFaceRect"
Description
Face rectangle.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FACE_REYE_CENTER = "HwMnoteFaceReyeCenter"
Description
Right eye centered.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FACE_SMILE_SCORE = "HwMnoteFaceSmileScore"
Description
Smile score of for faces.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FACE_VERSION = "HwMnoteFaceVersion"
Description
Facial recognition algorithm version.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FILE_SOURCE = "FileSource"
Description
Image source.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FLASH_ENERGY = "FlashEnergy"
Description
Strobe energy at the time the image was captured, in Beam Candle Power Seconds (BCPS).
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FLASHPIX_VERSION = "FlashpixVersion"
Description
FlashPix format version supported by an FPXR file. It is used to enhance device compatibility.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FOCAL_PLANE_RESOLUTION_UNIT = "FocalPlaneResolutionUnit"
Description
Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FOCAL_PLANE_X_RESOLUTION = "FocalPlaneXResolution"
Description
Number of pixels in the image width (X) direction per FocalPlaneResolutionUnit.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FOCAL_PLANE_Y_RESOLUTION = "FocalPlaneYResolution"
Description
Number of pixels in the image height (Y) direction per FocalPlaneResolutionUnit.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_FRONT_CAMERA = "HwMnoteFrontCamera"
Description
Whether the front camera is used to take a selfie.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GAIN_CONTROL = "GainControl"
Description
Degree of overall image gain adjustment.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GAMMA = "Gamma"
Description
Gamma value.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GIF_LOOP_COUNT = "GIFLoopCount"
Description
Number of GIF loops.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_ALTITUDE = "GPSAltitude"
Description
Altitude based on the reference in GPSAltitudeRef.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_ALTITUDE_REF = "GPSAltitudeRef"
Description
Whether the latitude is north or south latitude.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_AREA_INFORMATION = "GPSAreaInformation"
Description
String that records the name of the GPS area.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING = "GPSDestBearing"
Description
Bearing to the destination point.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING_REF = "GPSDestBearingRef"
Description
Reference of the bearing to the destination point.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE = "GPSDestDistance"
Description
Distance to the destination point.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE_REF = "GPSDestDistanceRef"
Description
Unit used to express the distance to the destination point.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE = "GPSDestLatitude"
Description
Latitude of the destination point.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE_REF = "GPSDestLatitudeRef"
Description
Whether the latitude of the destination point is north or south latitude.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE = "GPSDestLongitude"
Description
Longitude of the destination point.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE_REF = "GPSDestLongitudeRef"
Description
Whether the longitude of the destination point is east or west longitude.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_DIFFERENTIAL = "GPSDifferential"
Description
Whether differential correction is applied to the GPS receiver. It is critical to accurate location accuracy.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_DOP = "GPSDOP"
Description
GPS DOP (data degree of precision)
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_H_POSITIONING_ERROR = "GPSHPositioningError"
Description
Horizontal positioning error, in meters.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION = "GPSImgDirection"
Description
Direction of the image when it was captured.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION_REF = "GPSImgDirectionRef"
Description
Reference of the direction of the image when it was captured.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE = "GPSLatitude"
Description
Image latitude.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = "GPSLatitudeRef"
Description
Whether the latitude is north or south latitude.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = "GPSLongitude"
Description
Image longitude.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = "GPSLongitudeRef"
Description
Whether the longitude is east or west longitude.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_MAP_DATUM = "GPSMapDatum"
Description
Geodetic survey data used by the GPS receiver.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_MEASURE_MODE = "GPSMeasureMode"
Description
GPS measurement pmode.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_PROCESSING_METHOD = "GPSProcessingMethod"
Description
String that records the name of the method used for positioning.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_SATELLITES = "GPSSatellites"
Description
GPS satellites used for measurement.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_SPEED = "GPSSpeed"
Description
Movement speed of the GPS receiver.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_SPEED_REF = "GPSSpeedRef"
Description
Unit used to express the movement speed of the GPS receiver.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_STATUS = "GPSStatus"
Description
Status of the GPS receiver when the image was recorded.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_TRACK = "GPSTrack"
Description
Movement direction of the GPS receiver.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_TRACK_REF = "GPSTrackRef"
Description
Reference of the movement direction of the GPS receiver.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_GPS_VERSION_ID = "GPSVersionID"
Description
Version of GPSInfoIFD.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = "ImageLength"
Description
Image length.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_IMAGE_UNIQUE_ID = "ImageUniqueID"
Description
Unique identifier assigned to each image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = "ImageWidth"
Description
Image width.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEYYY = "ISOSpeedLatitudeyyy"
Description
ISO speed latitude yyy value of the camera or input device, which is defined in ISO 12232.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEZZZ = "ISOSpeedLatitudezzz"
Description
ISO speed latitude zzz value of the camera or input device, which is defined in ISO 12232.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = "ISOSpeedRatings"
Description
ISO sensitivity or ISO speed, for example, 400.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT = "JPEGInterchangeFormat"
Description
Offset of the SOI marker of a JPEG interchange format bitstream.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT_LENGTH = "JPEGInterchangeFormatLength"
Description
Number of bytes of the JPEG stream.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_LENS_MAKE = "LensMake"
Description
Manufacturer of the lens.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_LENS_MODEL = "LensModel"
Description
Model of the lens.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_LENS_SERIAL_NUMBER = "LensSerialNumber"
Description
Serial number of the lens.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_LENS_SPECIFICATION = "LensSpecification"
Description
Specifications of the lens.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_MAKER_NOTE = "MakerNote"
Description
Marker used by EXIF/DCF manufacturers to record any required information.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_MAX_APERTURE_VALUE = "MaxApertureValue"
Description
Smallest F number of the lens.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_NEW_SUBFILE_TYPE = "NewSubfileType"
Description
Data type of a subfile, such as a full-resolution image, a thumbnail, or a part of a multi-frame image. The value is a bit mask. The value 0 indicates a full-resolution image, 1 indicates a thumbnail, and 2 indicates a part of a multi-frame image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_OECF = "OECF"
Description
Opto-Electric Conversion Function (OECF) specified in ISO 14524.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_OFFSET_TIME = "OffsetTime"
Description
Time with an offset from UTC when the image was captured, in the format of ±HH:MM.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_OFFSET_TIME_DIGITIZED = "OffsetTimeDigitized"
Description
Time with an offset from UTC when the image was digitized. It helps to accurately adjust the timestamp.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_OFFSET_TIME_ORIGINAL = "OffsetTimeOriginal"
Description
Time with an offset from UTC when the original image was created. It is critical for time-sensitive applications.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_ORIENTATION = "Orientation"
Description
Image orientation.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_PHOTOGRAPHIC_SENSITIVITY = "PhotographicSensitivity"
Description
Sensitivity of the camera or input device when the image was captured.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_PHOTOMETRIC_INTERPRETATION = "PhotometricInterpretation"
Description
Color space of the image data, for example, RGB or YCbCr.
Since: 12
const char* OHOS_IMAGE_PROPERTY_PLANAR_CONFIGURATION = "PlanarConfiguration"
Description
Storage format of components of each pixel, which can be chunky or planar.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_PRIMARY_CHROMATICITIES = "PrimaryChromaticities"
Description
Chromaticities of the primaries of the image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_REFERENCE_BLACK_WHITE = "ReferenceBlackWhite"
Description
A pair of headroom and footroom image data values (codes) for each pixel component.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_RESOLUTION_UNIT = "ResolutionUnit"
Description
Unit of measurement for XResolution and YResolution.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_ROWS_PER_STRIP = "RowsPerStrip"
Description
Number of rows per strip.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SAMPLES_PER_PIXEL = "SamplesPerPixel"
Description
Number of components per pixel. The value is 3 for RGB and YCbCr images. The JPEG key is used in JPEG compressed data.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SATURATION = "Saturation"
Description
Direction of saturation processing used by the camera.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SCENE_CAPTURE_TYPE = "SceneCaptureType"
Description
Type of the scene that was captured.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SCENE_POINTER = "HwMnoteScenePointer"
Description
Pointer to the scene.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SCENE_TYPE = "SceneType"
Description
Type of the scene, for example, portrait, scenery, motion, and night.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SCENE_VERSION = "HwMnoteSceneVersion"
Description
Scene algorithm version.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SENSING_METHOD = "SensingMethod"
Description
Type of the image sensor on the camera.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SHARPNESS = "Sharpness"
Description
Direction of sharpness processing used by the camera.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SHUTTER_SPEED_VALUE = "ShutterSpeedValue"
Description
Shutter speed, expressed in Additive System of Photographic Exposure (APEX) values.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SOFTWARE = "Software"
Description
Name and version number of the software used to create the image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE = "SourceExposureTimesOfCompositeImage"
Description
Exposure time of source images of the composite image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE = "SourceImageNumberOfCompositeImage"
Description
Number of source images of the composite image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SPATIAL_FREQUENCY_RESPONSE = "SpatialFrequencyResponse"
Description
Spatial frequency table of the camera or input device.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SPECTRAL_SENSITIVITY = "SpectralSensitivity"
Description
Spectral sensitivity of each channel of the camera.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_STRIP_BYTE_COUNTS = "StripByteCounts"
Description
Number of bytes in each strip after compression.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_STRIP_OFFSETS = "StripOffsets"
Description
Byte offset of each strip.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SUBFILE_TYPE = "SubfileType"
Description
Type of data contained in this subfile. This tag has been deprecated. Use NewSubfileType instead.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SUBJECT_AREA = "SubjectArea"
Description
Location and area of the main subject in the entire scene.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE = "SubjectDistance"
Description
Distance to the subject, in meters.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE_RANGE = "SubjectDistanceRange"
Description
Distance to the subject.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SUBJECT_LOCATION = "SubjectLocation"
Description
Location of the main subject relative to the left edge.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SUBSEC_TIME = "SubsecTime"
Description
Tag used to record fractions of seconds for the DateTime tag.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SUBSEC_TIME_DIGITIZED = "SubsecTimeDigitized"
Description
Tag used to record fractions of seconds for the DateTimeDigitized tag.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_SUBSEC_TIME_ORIGINAL = "SubsecTimeOriginal"
Description
Tag used to record fractions of seconds for the DateTimeOriginal tag.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_TRANSFER_FUNCTION = "TransferFunction"
Description
Transfer function for the image, which is usually used for color correction.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_WHITE_POINT = "WhitePoint"
Description
Chromaticity of the white point of the image.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_X_RESOLUTION = "XResolution"
Description
Number of pixels per ResolutionUnit in the image width (X) direction.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_Y_RESOLUTION = "YResolution"
Description
Number of pixels per ResolutionUnit in the image height (Y) direction.
Since: 12
static const char* OHOS_IMAGE_PROPERTY_YCBCR_COEFFICIENTS = "YCbCrCoefficients"
Description
Transformation from RGB to YCbCr image data.
Since: 12