From 38050140d1e3cdba27883e2c465d9700664e8a79 Mon Sep 17 00:00:00 2001 From: yangfan Date: Fri, 12 Apr 2024 14:17:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20ImageSource&imagePacker&Pi?= =?UTF-8?q?xelMap=20=E6=96=B0NDK=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/BUILD.gn | 54 +++ .../include/image/image_packer_native.h | 238 ++++++++++ .../include/image/image_source_native.h | 433 +++++++++++++++++ .../include/image/pixelmap_native.h | 445 ++++++++++++++++++ .../image_framework/libimage_packer.ndk.json | 50 ++ .../image_framework/libimage_source.ndk.json | 114 +++++ .../image_framework/libpixelmap.ndk.json | 114 +++++ 7 files changed, 1448 insertions(+) create mode 100644 multimedia/image_framework/include/image/image_packer_native.h create mode 100644 multimedia/image_framework/include/image/image_source_native.h create mode 100644 multimedia/image_framework/include/image/pixelmap_native.h create mode 100644 multimedia/image_framework/libimage_packer.ndk.json create mode 100644 multimedia/image_framework/libimage_source.ndk.json create mode 100644 multimedia/image_framework/libpixelmap.ndk.json diff --git a/multimedia/image_framework/BUILD.gn b/multimedia/image_framework/BUILD.gn index 22c7d1fb9..c48d179ec 100644 --- a/multimedia/image_framework/BUILD.gn +++ b/multimedia/image_framework/BUILD.gn @@ -27,6 +27,26 @@ ohos_ndk_headers("image_header") { ] } +ohos_ndk_library("libpixelmap") { + ndk_description_file = "./libpixelmap.ndk.json" + output_name = "pixelmap" + output_extension = "so" + min_compact_version = "12" + system_capability = "SystemCapability.Multimedia.Image.Core" + system_capability_headers = [ + "./include/image/pixelmap_native.h", + "./include/image/image_common.h", + ] +} + +ohos_ndk_headers("libpixelmap_header") { + dest_dir = "$ndk_headers_out_dir/multimedia/image_framework" + sources = [ + "./include/image/image_common.h", + "./include/image/pixelmap_native.h", + ] +} + ohos_ndk_library("libimage_ndk") { ndk_description_file = "./libimage_ndk.ndk.json" min_compact_version = "1" @@ -63,6 +83,23 @@ ohos_ndk_headers("image_source_ndk_header") { sources = [ "./include/image_source_mdk.h" ] } +ohos_ndk_library("libimage_source") { + ndk_description_file = "./libimage_source.ndk.json" + output_name = "image_source" + output_extension = "so" + min_compact_version = "12" + system_capability = "SystemCapability.Multimedia.Image.ImageSource" + system_capability_headers = [ + "./include/image/image_source_native.h", + "./include/image/image_common.h", + ] +} + +ohos_ndk_headers("libimage_source_header") { + dest_dir = "$ndk_headers_out_dir/multimedia/image_framework" + sources = [ "./include/image/image_source_native.h" ] +} + ohos_ndk_library("libimage_packer_ndk") { ndk_description_file = "./libimage_packer_ndk.ndk.json" output_name = "image_packer_ndk" @@ -72,3 +109,20 @@ ohos_ndk_headers("image_packer_ndk_header") { dest_dir = "$ndk_headers_out_dir/multimedia/image_framework" sources = [ "./include/image_packer_mdk.h" ] } + +ohos_ndk_library("libimage_packer") { + ndk_description_file = "./libimage_packer.ndk.json" + output_name = "image_packer" + output_extension = "so" + min_compact_version = "12" + system_capability = "SystemCapability.Multimedia.Image.ImagePacker" + system_capability_headers = [ + "./include/image/image_packer_native.h", + "./include/image/image_common.h", + ] +} + +ohos_ndk_headers("libimage_packer_header") { + dest_dir = "$ndk_headers_out_dir/multimedia/image_framework" + sources = [ "./include/image/image_packer_native.h" ] +} diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h new file mode 100644 index 000000000..f527eae35 --- /dev/null +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -0,0 +1,238 @@ +/* + * Copyright (C) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup image + * @{ + * + * @brief Provides APIs for access to the image interface. + * + * @since 12 + */ + +/** + * @file image_packer_native.h + * + * @brief Declares APIs for encoding image into data or file. + * + * @library libimage_packer.so + * @syscap SystemCapability.Multimedia.Image.ImagePacker + * @since 12 + */ + +#ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_PACKER_NATIVE_H_ +#define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_PACKER_NATIVE_H_ +#include "image_common.h" +#include "image_source_native.h" +#include "pixelmap_native.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Define a ImagePacker struct type, used for ImagePacker pointer controls. + * + * @since 12 + */ +struct OH_ImagePackerNative; +typedef struct OH_ImagePackerNative OH_ImagePackerNative; + +/** + * @brief Defines the image packing options. + * + * @since 12 + */ +struct OH_PackingOptions; +typedef struct OH_PackingOptions OH_PackingOptions; + +/** + * @brief Enumerates packing dynamic range. + * + * @since 12 + */ +typedef enum { + /* + * Packing according to the content of the image. + */ + IMAGE_PACKER_DYNAMIC_RANGE_AUTO = 0, + /* + * Packing to standard dynamic range. + */ + IMAGE_PACKER_DYNAMIC_RANGE_SDR = 1, +}IMAGE_PACKER_DYNAMIC_RANGE; + +/** + * @brief Create a pointer for PackingOptions struct. + * + * @param options The PackingOptions pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PackingOptions_Create(OH_PackingOptions **options); + +/** + * @brief Get mime type for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param format the number of image format.The user can pass in a null pointer and zero size, we will allocate memory, + * but user must free memory after use. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PackingOptions_GetMimeType(OH_PackingOptions *options, + Image_MimeType *format); + +/** + * @brief Set format number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param format the number of image format. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PackingOptions_SetMimeType(OH_PackingOptions *options, + Image_MimeType *format); + +/** + * @brief Get quality for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param quality the number of image quality. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PackingOptions_GetQuality(OH_PackingOptions *options, + uint32_t *quality); + +/** + * @brief Set quality number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param quality the number of image quality. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PackingOptions_SetQuality(OH_PackingOptions *options, + uint32_t quality); + +/** + * @brief delete DecodingOptions pointer. + * + * @param options The DecodingOptions pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PackingOptions_Release(OH_PackingOptions *options); + +/** + * @brief Set desiredDynamicRange number for OH_ImagePackerNative struct. + * + * @param opts The PackingOptions pointer will be operated. + * @param desiredDynamicRange The number of image {@link IMAGE_PACKER_DYNAMIC_RANGE}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PackingOptions_SetDesiredDynamicRange(OH_PackingOptions *opts, + int32_t desiredDynamicRange); + +/** + * @brief Get desiredDynamicRange number for OH_ImagePackerNative struct. + * + * @param opts The PackingOptions pointer will be operated. + * @param desiredDynamicRange The number of image {@link IMAGE_PACKER_DYNAMIC_RANGE}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PackingOptions_GetDesiredDynamicRange(OH_PackingOptions *opts, + int32_t* desiredDynamicRange); + +/** + * @brief Create a pointer for OH_ImagePackerNative struct. + * + * @param options The OH_ImagePackerNative pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImagePackerNative_Create(OH_ImagePackerNative **imagePacker); + +/** + * @brief Encoding an ImageSource into the data with required format. + * + * @param imagePacker The imagePacker to use for packing. + * @param options Indicates the encoding {@link OH_PackingOptions}. + * @param imageSource The imageSource to be packed. + * @param outData The output data buffer to store the packed image. + * @param size A pointer to the size of the output data buffer. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImagePackerNative_PackToDataFromImageSource(OH_ImagePackerNative *imagePacker, + OH_PackingOptions *options, OH_ImageSourceNative *imageSource, uint8_t *outData, size_t *size); + +/** + * @brief Encoding a Pixelmap into the data with required format. + * + * @param imagePacker The imagePacker to use for packing. + * @param options Indicates the encoding {@link OH_PackingOptions}. + * @param pixelmap The pixelmap to be packed. + * @param outData The output data buffer to store the packed image. + * @param size A pointer to the size of the output data buffer. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImagePackerNative_PackToDataFromPixelmap(OH_ImagePackerNative *imagePacker, + OH_PackingOptions *options, OH_PixelmapNative *pixelmap, uint8_t *outData, size_t *size); + +/** + * @brief Encoding an ImageSource into the a file with fd with required format. + * + * @param imagePacker The image packer to use for packing. + * @param options Indicates the encoding {@link OH_PackingOptions}. + * @param imageSource The imageSource to be packed. + * @param fd Indicates a writable file descriptor. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImagePackerNative_PackToFileFromImageSource(OH_ImagePackerNative *imagePacker, + OH_PackingOptions *options, OH_ImageSourceNative *imageSource, int32_t fd); + +/** + * @brief Encoding a Pixelmap into the a file with fd with required format + * + * @param imagePacker The image packer to use for packing. + * @param options Indicates the encoding {@link OH_PackingOptions}. + * @param pixelmap The pixelmap to be packed. + * @param fd Indicates a writable file descriptor. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImagePackerNative_PackToFileFromPixelmap(OH_ImagePackerNative *imagePacker, + OH_PackingOptions *options, OH_PixelmapNative *pixelmap, int32_t fd); + +/** + * @brief Releases an imagePacker object. + * + * @param imagePacker A pointer to the image packer object to be released. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImagePackerNative_Release(OH_ImagePackerNative *imagePacker); + +#ifdef __cplusplus +}; +#endif +/* *@} */ +#endif // INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_PACKER_NATIVE_H_ \ No newline at end of file diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h new file mode 100644 index 000000000..0bc088b6b --- /dev/null +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -0,0 +1,433 @@ +/* + * Copyright (C) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup image + * @{ + * + * @brief Provides APIs for access to the image interface. + * + * @since 12 + */ + +/** + * @file image_source_native.h + * + * @brief Declares APIs for decoding an image source into a pixel map. + * + * @library libimage_source.so + * @syscap SystemCapability.Multimedia.Image.ImageSource + * @since 12 + */ + +#ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_SOURCE_NATIVE_H_ +#define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_SOURCE_NATIVE_H_ +#include "image_common.h" + +#include "pixelmap_native.h" +#include "rawfile/raw_file.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Defines an image source object for the image interface. + * + * @since 12 + */ +struct OH_ImageSourceNative; +typedef struct OH_ImageSourceNative OH_ImageSourceNative; + +/** + * @brief Defines image source infomation + * {@link OH_ImageSourceInfo_Create}. + * + * @since 12 + */ +struct OH_ImageSource_Info; +typedef struct OH_ImageSource_Info OH_ImageSource_Info; + +/** + * @brief Enumerates decoding dynamic range.. + * + * @since 12 + */ +typedef enum { + /* + * Dynamic range depends on the image. + */ + IMAGE_DYNAMIC_RANGE_AUTO = 0, + /* + * Standard dynamic range. + */ + IMAGE_DYNAMIC_RANGE_SDR = 1, + /* + * High dynamic range. + */ + IMAGE_DYNAMIC_RANGE_HDR = 2, +}IMAGE_DYNAMIC_RANGE; + +/** + * @brief Create a pointer for OH_ImageSource_Info struct. + * + * @param info The OH_ImageSource_Info pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceInfo_Create(OH_ImageSource_Info **info); + +/** + * @brief Get width number for OH_ImageSource_Info struct. + * + * @param info The DecodingOptions pointer will be operated. + * @param width the number of image width. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceInfo_GetWidth(OH_ImageSource_Info *info, uint32_t *width); + +/** + * @brief Get height number for OH_ImageSource_Info struct. + * + * @param info The DecodingOptions pointer will be operated. + * @param height the number of image height. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceInfo_GetHeight(OH_ImageSource_Info *info, uint32_t *height); + +/** + * @brief Get isHdr for OH_ImageSource_Info struct. + * + * @param info The {@link OH_ImageSource_Info} pointer will be operated. + * @param isHdr Whether the image has a high dynamic range. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceInfo_GetDynamicRange(OH_ImageSource_Info *info, bool *isHdr); + +/** + * @brief delete OH_ImageSource_Info pointer. + * + * @param info The OH_ImageSource_Info pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceInfo_Release(OH_ImageSource_Info *info); + +/** + * @brief Defines the options for decoding the image source. + * It is used in {@link OH_ImageSourceNative_CreatePixelmap}. + * + * @since 12 + */ +struct OH_DecodingOptions; +typedef struct OH_DecodingOptions OH_DecodingOptions; + +/** + * @brief Create a pointer for InitializationOtions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_Create(OH_DecodingOptions **options); + +/** + * @brief Get pixelFormat number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param pixelFormat the number of image pixelFormat. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_GetPixelFormat(OH_DecodingOptions *options, + int32_t *pixelFormat); + +/** + * @brief Set pixelFormat number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param pixelFormat the number of image pixelFormat. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_SetPixelFormat(OH_DecodingOptions *options, + int32_t pixelFormat); + +/** + * @brief Get index number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param index the number of image index. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_GetIndex(OH_DecodingOptions *options, uint32_t *index); + +/** + * @brief Set index number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param index the number of image index. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_SetIndex(OH_DecodingOptions *options, uint32_t index); + +/** + * @brief Get rotate number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param rotate the number of image rotate. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_GetRotate(OH_DecodingOptions *options, float *rotate); + +/** + * @brief Set rotate number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param rotate the number of image rotate. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_SetRotate(OH_DecodingOptions *options, float rotate); + +/** + * @brief Get desiredSize number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param desiredSize the number of image desiredSize. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_GetDesiredSize(OH_DecodingOptions *options, + Image_Size *desiredSize); + +/** + * @brief Set desiredSize number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param desiredSize the number of image desiredSize. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_SetDesiredSize(OH_DecodingOptions *options, + Image_Size *desiredSize); + +/** + * @brief Set desiredRegion number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param desiredRegion the number of image desiredRegion. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_GetDesiredRegion(OH_DecodingOptions *options, + Image_Region *desiredRegion); + +/** + * @brief Set desiredRegion number for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param desiredRegion the number of image desiredRegion. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_SetDesiredRegion(OH_DecodingOptions *options, + Image_Region *desiredRegion); + +/** + * @brief Get desiredDynamicRange for DecodingOptions struct. + * + * @param opts The DecodingOptions pointer will be operated. + * @param desiredDynamicRange the number of image {@link IMAGE_DYNAMIC_RANGE}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_GetDesiredDynamicRange(OH_DecodingOptions *opts, + int32_t *desiredDynamicRange); + +/** + * @brief Set desiredDynamicRange for DecodingOptions struct. + * + * @param opts The DecodingOptions pointer will be operated. + * @param desiredDynamicRange the number of image {@link IMAGE_DYNAMIC_RANGE}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_SetDesiredDynamicRange(OH_DecodingOptions *opts, + int32_t desiredDynamicRange); + +/** + * @brief delete DecodingOptions pointer. + * + * @param options The DecodingOptions pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_Release(OH_DecodingOptions *options); + +/** + * @brief Creates an ImageSource pointer. + * + * @param uri Indicates a pointer to the image source URI. Only a file URI or Base64 URI is accepted. + * @param uriSize Indicates the length of the image source URI. + * @param res Indicates a pointer to the ImageSource object created at the C++ native layer. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_CreateFromUri(char *uri, size_t uriSize, OH_ImageSourceNative **res); + +/** + * @brief Creates an void pointer + * + * @param fd Indicates the image source file descriptor. + * @param res Indicates a void pointer to the ImageSource object created at the C++ native layer. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_CreateFromFd(int32_t fd, OH_ImageSourceNative **res); + +/** + * @brief Creates an void pointer + * + * @param data Indicates a pointer to the image source data. Only a formatted packet data or Base64 data is accepted. + * @param dataSize Indicates the size of the image source data. + * @param res Indicates a void pointer to the ImageSource object created at the C++ native layer. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_CreateFromData(uint8_t *data, size_t dataSize, OH_ImageSourceNative **res); + +/** + * @brief Creates an void pointer + * + * @param rawFile Indicates the raw file's file descriptor. + * @param res Indicates a void pointer to the ImageSource object created at the C++ native layer. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile(RawFileDescriptor *rawFile, OH_ImageSourceNative **res); + +/** + * @brief Decodes an void pointer + * based on the specified {@link OH_DecodingOptions} struct. + * + * @param source Indicates a void pointer(from ImageSource pointer convert). + * @param options Indicates a pointer to the options for decoding the image source. + * For details, see {@link OH_DecodingOptions}. + * @param resPixMap Indicates a void pointer to the Pixelmap object obtained at the C++ native layer. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_CreatePixelmap(OH_ImageSourceNative *source, OH_DecodingOptions *options, + OH_PixelmapNative **pixelmap); + +/** + * @brief Decodes an void pointer + * the Pixelmap objects at the C++ native layer + * based on the specified {@link OH_DecodingOptions} struct. + * + * @param source Indicates a void pointer(from ImageSource pointer convert). + * @param options Indicates a pointer to the options for decoding the image source. + * For details, see {@link OH_DecodingOptions}. + * @param resVecPixMap Indicates a pointer array to the Pixelmap objects obtained at the C++ native layer. + * It cannot be a null pointer. + * @param outSize Indicates a size of resVecPixMap. User can get size from {@link OH_ImageSourceNative_GetFrameCount}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_CreatePixelmapList(OH_ImageSourceNative *source, OH_DecodingOptions *options, + OH_PixelmapNative *resVecPixMap[], size_t *outSize); + +/** + * @brief Obtains the delay time list from some ImageSource objects (such as GIF image sources). + * + * @param source Indicates a void pointer(from ImageSource pointer convert). + * @param delayTimeList Indicates a pointer to the delay time list obtained. It cannot be a null pointer. + * @param size Indicates a size of delayTimeList. User can get size from {@link OH_ImageSourceNative_GetFrameCount}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_GetDelayTimeList(OH_ImageSourceNative *source, + int32_t *delayTimeList, size_t size); + +/** + * @brief Obtains image source information from an ImageSource object by index. + * + * @param source Indicates a void pointer(from ImageSource pointer convert). + * @param index Indicates the index of the frame. + * @param info Indicates a pointer to the image source information obtained. + * For details, see {@link OH_ImageSource_Info}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_GetImageInfo(OH_ImageSourceNative *source, int32_t index, + OH_ImageSource_Info *info); + +/** + * @brief Obtains the value of an image property from an ImageSource object. + * + * @param source Indicates a void pointer(from ImageSource pointer convert). + * @param key Indicates a pointer to the property. For details, see {@link Image_String}., key is an exif constant. + * Release after use ImageSource, see {@link OH_ImageSourceNative_Release}. + * @param value Indicates a pointer to the value obtained.The user can pass in a null pointer and zero size, + * we will allocate memory, but user must free memory after use. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_GetImageProperty(OH_ImageSourceNative *source, Image_String *key, + Image_String *value); + +/** + * @brief Modifies the value of an image property of an ImageSource object. + * @param source Indicates a void pointer(from ImageSource pointer convert). + * @param key Indicates a pointer to the property. For details, see {@link Image_String}., key is an exif constant. + * Release after use ImageSource, see {@link OH_ImageSourceNative_Release}. + * @param value Indicates a pointer to the new value of the property. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_ModifyImageProperty(OH_ImageSourceNative *source, Image_String *key, + Image_String *value); + +/** + * @brief Obtains the number of frames from an ImageSource object. + * + * @param source Indicates a pointer to the {@link OH_ImageSourceNative} object at the C++ native layer. + * @param res Indicates a pointer to the number of frames obtained. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_GetFrameCount(OH_ImageSourceNative *source, uint32_t *frameCount); + +/** + * @brief Releases an ImageSourc object. + * + * @param source Indicates a ImageSource pointer. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_ImageSourceNative_Release(OH_ImageSourceNative *source); + +#ifdef __cplusplus +}; +#endif +/** @} */ +#endif // INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_SOURCE_NATIVE_H_ \ No newline at end of file diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h new file mode 100644 index 000000000..7cfeb8d4e --- /dev/null +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -0,0 +1,445 @@ +/* + * Copyright (C) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup image + * @{ + * + * @brief Provides APIs for obtaining pixel map data and information. + * + * @Syscap SystemCapability.Multimedia.Image.Core + * @since 12 + */ + +/** + * @file pixelmap_native.h + * + * @brief Declares the APIs that can access a pixel map. + * + * @library libpixelmap.so + * @Syscap SystemCapability.Multimedia.Image.Core + * @since 12 + */ + +#ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_PIXELMAP_NATIVE_H_ +#define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_PIXELMAP_NATIVE_H_ +#include "image_common.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Define a Pixelmap struct type, used for pixelmap pointer controls. + * + * @since 12 + */ +struct OH_PixelmapNative; +typedef struct OH_PixelmapNative OH_PixelmapNative; + +/** + * @brief Define a pixelmap alpha type. + * + * @since 12 + */ +typedef enum { + /* + * Unknown format + */ + PIXELMAP_ALPHA_TYPE_UNKNOWN = 0, + /* + * Opaque format + */ + PIXELMAP_ALPHA_TYPE_OPAQUE = 1, + /* + * Premultiplied format + */ + PIXELMAP_ALPHA_TYPE_PREMULTIPLIED = 2, +}PIXELMAP_ALPHA_TYPE; + +typedef enum { + /* + * Unknown format + */ + PIXEL_FORMAT_UNKNOWN = 0, + /* + * RGB_565 format + */ + PIXEL_FORMAT_RGB_565 = 2, + /* + * RGBA_8888 format + */ + PIXEL_FORMAT_RGBA_8888 = 3, + /* + * BGRA_8888 format + */ + PIXEL_FORMAT_BGRA_8888 = 4, + /* + * RGB_888 format + */ + PIXEL_FORMAT_RGB_888 = 5, + /* + * ALPHA_8 format + */ + PIXEL_FORMAT_ALPHA_8 = 6, + /* + * RGBA_F16 format + */ + PIXEL_FORMAT_RGBA_F16 = 7, + /* + * NV21 format + */ + PIXEL_FORMAT_NV21 = 8, + /* + * NV12 format + */ + PIXEL_FORMAT_NV12 = 9, +} PIXEL_FORMAT; + +/** + * @brief Defines the options used for creating a pixel map. + * + * @since 12 + */ +struct OH_Pixelmap_InitializationOptions; +typedef struct OH_Pixelmap_InitializationOptions OH_Pixelmap_InitializationOptions; + +/** + * @brief Create a for InitializationOtions struct. + * + * @param options The InitializationOtions pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_Create(OH_Pixelmap_InitializationOptions **options); + +/** + * @brief Get width number for InitializationOtions struct. + * + * @param options The InitializationOtions pointer will be operated. + * @param width the number of image width. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_GetWidth(OH_Pixelmap_InitializationOptions *options, + uint32_t *width); + +/** + * @brief Set width number for InitializationOtions struct. + * + * @param options The InitializationOtions pointer will be operated. + * @param width the number of image width. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_SetWidth(OH_Pixelmap_InitializationOptions *options, + uint32_t width); + +/** + * @brief Get height number for InitializationOtions struct. + * + * @param options The InitializationOtions pointer will be operated. + * @param height the number of image height. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_GetHeight(OH_Pixelmap_InitializationOptions *options, + uint32_t *height); + +/** + * @brief Set height number for InitializationOtions struct. + * + * @param options The InitializationOtions pointer will be operated. + * @param height the number of image height. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_SetHeight(OH_Pixelmap_InitializationOptions *options, + uint32_t height); + +/** + * @brief Get pixelFormat number for InitializationOtions struct. + * + * @param options The InitializationOtions pointer will be operated. + * @param pixelFormat the number of image pixelFormat. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_GetPixelFormat(OH_Pixelmap_InitializationOptions *options, + int32_t *pixelFormat); + +/** + * @brief Set pixelFormat number for InitializationOtions struct. + * + * @param options The InitializationOtions pointer will be operated. + * @param pixelFormat the number of image pixelFormat. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_SetPixelFormat(OH_Pixelmap_InitializationOptions *options, + int32_t pixelFormat); + +/** + * @brief Get alphaType number for InitializationOtions struct. + * + * @param options The InitializationOtions pointer will be operated. + * @param alphaType the number of image alphaType. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_GetAlphaType(OH_Pixelmap_InitializationOptions *options, + int32_t *alphaType); + +/** + * @brief Set alphaType number for InitializationOtions struct. + * + * @param options The InitializationOtions pointer will be operated. + * @param alphaType the number of image alphaType. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_SetAlphaType(OH_Pixelmap_InitializationOptions *options, + int32_t alphaType); + +/** + * @brief delete InitializationOtions pointer. + * + * @param options The InitializationOtions pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_Release(OH_Pixelmap_InitializationOptions *options); + +/** + * @brief Defines the pixel map information. + * + * @since 12 + */ +struct OH_Pixelmap_ImageInfo; +typedef struct OH_Pixelmap_ImageInfo OH_Pixelmap_ImageInfo; + +/** + * @brief Create imageinfo struct . + * + * @param info The imageinfo pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapImageInfo_Create(OH_Pixelmap_ImageInfo **info); + +/** + * @brief Get width number for imageinfo struct. + * + * @param info The imageinfo pointer will be operated. + * @param width The number of imageinfo width. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapImageInfo_GetWidth(OH_Pixelmap_ImageInfo *info, uint32_t *width); + +/** + * @brief Get height number for imageinfo struct. + * + * @param info The imageinfo pointer will be operated. + * @param height The number of imageinfo height. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapImageInfo_GetHeight(OH_Pixelmap_ImageInfo *info, uint32_t *height); + +/** + * @brief Get rowStride number for imageinfo struct. + * + * @param info The imageinfo pointer will be operated. + * @param rowStride The number of imageinfo rowStride. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapImageInfo_GetRowStride(OH_Pixelmap_ImageInfo *info, uint32_t *rowStride); + +/** + * @brief Get pixelFormat number for imageinfo struct. + * + * @param info The imageinfo pointer will be operated. + * @param pixelFormat The number of imageinfo pixelFormat. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat(OH_Pixelmap_ImageInfo *info, int32_t *pixelFormat); + +/** + * @brief Get density number for imageinfo struct. + * + * @param info The imageinfo pointer will be operated. + * @param density The number of imageinfo density. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapImageInfo_GetAlphaType(OH_Pixelmap_ImageInfo *info, int32_t *alphaType); + +/** + * @brief Get isHdr for imageinfo struct. + * + * @param info The {@link OH_Pixelmap_ImageInfo} pointer will be operated. + * @param isHdr Whether the image has a high dynamic range. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapImageInfo_GetDynamicRange + * @since 12 + */ +Image_ErrorCode OH_PixelmapImageInfo_GetDynamicRange(OH_Pixelmap_ImageInfo *infos, bool *isHdr); + +/** + * @brief Delete imageinfo struct pointer. + * + * @param info The imageinfo pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapImageInfo_Release(OH_Pixelmap_ImageInfo *info); + +/** + * @brief Creates a PixelMap object. + * + * @param data Color buffer in BGRA_8888 format. + * @param dataLength Color buffer size in BGRA_8888 format. + * @param options IPixel properties, including the alpha type, size, pixel format, and editable. + * @param pixelmap Pixelmap pointer for created. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_CreatePixelmap(uint8_t *data, size_t dataLength, + OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap); + +/** + * @brief Reads data of this pixel map to an Buffer. If this pixel map is created in the BGRA_8888 format, + * the data read is the same as the original data. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @param destination Buffer to which the image pixel map data will be written. + * @param bufferSize Buffer size to which the image pixel map data will be written. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapNative + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_ReadPixels(OH_PixelmapNative *pixelmap, uint8_t *destination, size_t *bufferSize); + +/** + * @brief Reads image data in an Buffer and writes the data to a Pixelmap object. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @param source Buffer from which the image data will be read. + * @param bufferSize Buffer size from which the image data will be read. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapNative + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_WritePixels(OH_PixelmapNative *pixelmap, uint8_t *source, size_t bufferSize); + +/** + * @brief Obtains pixel map information of this image. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @param imageInfo Indicates the pointer to the image information. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapNative OH_Pixelmap_ImageInfo + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_GetImageInfo(OH_PixelmapNative *pixelmap, OH_Pixelmap_ImageInfo *imageInfo); + +/** + * @brief Sets an opacity rate for this image pixel map. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @param rate Opacity rate to set. The value ranges from 0 to 1. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapNative + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_Opacity(OH_PixelmapNative *pixelmap, float rate); + +/** + * @brief Scales this image based on the input width and height. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @param scaleX Scaling ratio of the width. + * @param scaleY Scaling ratio of the height. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapNative + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_Scale(OH_PixelmapNative *pixelmap, float scaleX, float scaleY); + +/** + * @brief Translates this image based on the input coordinates. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @param x The distance to be translate in the X direction. + * @param y The distance to be translate in the Y direction. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapNative + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_Translate(OH_PixelmapNative *pixelmap, float x, float y); + +/** + * @brief Rotates this image based on the input angle. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @param angle Angle to rotate. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapNative + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_Rotate(OH_PixelmapNative *pixelmap, float angle); + +/** + * @brief Flips this image horizontally or vertically, or both. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @param shouldFilpHorizontally Whether to flip the image horizontally. + * @param shouldFilpVertically Whether to flip the image vertically. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapNative + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_Flip(OH_PixelmapNative *pixelmap, bool shouldFilpHorizontally, + bool shouldFilpVertically); + +/** + * @brief Crops this image based on the input size. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @param region Area size, read according to area. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapNative + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_Crop(OH_PixelmapNative *pixelmap, Image_Region *region); + +/** + * @brief Releases an OH_PixelmapNative object. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @see OH_PixelmapNative + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_Release(OH_PixelmapNative *pixelmap); + +#ifdef __cplusplus +}; +#endif +/** @} */ +#endif // INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_PIXELMAP_NATIVE_H_ diff --git a/multimedia/image_framework/libimage_packer.ndk.json b/multimedia/image_framework/libimage_packer.ndk.json new file mode 100644 index 000000000..33def951b --- /dev/null +++ b/multimedia/image_framework/libimage_packer.ndk.json @@ -0,0 +1,50 @@ +[ + { + "first_introduced": "12", + "name": "OH_PackingOptions_Create" + }, + { + "first_introduced": "12", + "name": "OH_PackingOptions_GetMimeType" + }, + { + "first_introduced": "12", + "name": "OH_PackingOptions_SetMimeType" + }, + { + "first_introduced": "12", + "name": "OH_PackingOptions_GetQuality" + }, + { + "first_introduced": "12", + "name": "OH_PackingOptions_SetQuality" + }, + { + "first_introduced": "12", + "name": "OH_PackingOptions_Release" + }, + { + "first_introduced": "12", + "name": "OH_ImagePackerNative_Create" + }, + { + "first_introduced": "12", + "name": "OH_ImagePackerNative_PackToDataFromImageSource" + }, + { + "first_introduced": "12", + "name": "OH_ImagePackerNative_PackToDataFromPixelmap" + }, + { + "first_introduced": "12", + "name": "OH_ImagePackerNative_PackToFileFromImageSource" + }, + { + "first_introduced": "12", + "name": "OH_ImagePackerNative_PackToFileFromPixelmap" + }, + { + "first_introduced": "12", + "name": "OH_ImagePackerNative_Release" + } +] \ No newline at end of file diff --git a/multimedia/image_framework/libimage_source.ndk.json b/multimedia/image_framework/libimage_source.ndk.json new file mode 100644 index 000000000..0c91a11dc --- /dev/null +++ b/multimedia/image_framework/libimage_source.ndk.json @@ -0,0 +1,114 @@ +[ + { + "first_introduced": "12", + "name": "OH_ImageSourceInfo_Create" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceInfo_GetWidth" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceInfo_GetHeight" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceInfo_Release" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_Create" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_GetPixelFormat" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_SetPixelFormat" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_GetIndex" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_SetIndex" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_GetRotate" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_SetRotate" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_GetDesiredSize" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_SetDesiredSize" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_GetDesiredRegion" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_SetDesiredRegion" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_Release" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_CreateFromUri" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_CreateFromFd" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_CreateFromData" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_CreateFromRawFile" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_CreatePixelmap" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_CreatePixelmapList" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_GetDelayTimeList" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_GetImageInfo" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_GetImageProperty" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_ModifyImageProperty" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_GetFrameCount" + }, + { + "first_introduced": "12", + "name": "OH_ImageSourceNative_Release" + } +] \ No newline at end of file diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json new file mode 100644 index 000000000..c1c138185 --- /dev/null +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -0,0 +1,114 @@ +[ + { + "first_introduced": "12", + "name": "OH_PixelmapInitializationOptions_Create" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapInitializationOptions_GetWidth" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapInitializationOptions_SetWidth" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapInitializationOptions_GetHeight" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapInitializationOptions_SetHeight" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapInitializationOptions_GetPixelFormat" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapInitializationOptions_SetPixelFormat" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapInitializationOptions_GetAlphaType" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapInitializationOptions_SetAlphaType" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapInitializationOptions_Release" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapImageInfo_Create" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapImageInfo_GetWidth" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapImageInfo_GetHeight" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapImageInfo_GetRowStride" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapImageInfo_GetPixelFormat" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapImageInfo_GetAlphaType" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapImageInfo_Release" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_CreatePixelmap" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_ReadPixels" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_WritePixels" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_GetImageInfo" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_Opacity" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_Scale" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_Translate" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_Rotate" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_Flip" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_Crop" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_Release" + } +] \ No newline at end of file -- Gitee