From 6656f1955f49e02938afc982c0b98b117c01594d Mon Sep 17 00:00:00 2001 From: "zhubingwei@huawei.com" Date: Thu, 21 Mar 2024 19:57:18 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/BUILD.gn | 56 + .../include/image/image_common.h | 1251 +++++++++++++++++ .../include/image/image_packer_native.h | 198 +++ .../include/image/image_source_native.h | 377 +++++ .../include/image/pixelmap_native.h | 453 ++++++ .../image_framework/libimage_packer.ndk.json | 50 + .../image_framework/libimage_source.ndk.json | 114 ++ .../image_framework/libpixelmap.ndk.json | 114 ++ 8 files changed, 2613 insertions(+) create mode 100644 multimedia/image_framework/include/image/image_common.h 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..2aaadcb6a 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/pixelmap_native.h", + "./include/image/image_common.h", + ] +} + ohos_ndk_library("libimage_ndk") { ndk_description_file = "./libimage_ndk.ndk.json" min_compact_version = "1" @@ -63,6 +83,24 @@ 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 +110,21 @@ 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_common.h b/multimedia/image_framework/include/image/image_common.h new file mode 100644 index 000000000..4e16b5bd1 --- /dev/null +++ b/multimedia/image_framework/include/image/image_common.h @@ -0,0 +1,1251 @@ +/* + * 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_common.h + * + * @brief Declares the common enums and structs used by the image interface. + * + * @syscap SystemCapability.Multimedia.Image.Core + * @since 12 + */ + +#ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_COMMON_H_ +#define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_COMMON_H_ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Defines the image size. + * + * @since 12 + */ +struct Image_Size { + /** Image width, in pixels. */ + uint32_t width; + /** Image height, in pixels. */ + uint32_t height; +}; + +/** + * @brief Declaration the image size. + * + * @since 12 + */ +typedef struct Image_Size Image_Size; + +/** + * @brief Defines the region of the image source to decode. + * + * @since 12 + */ +struct Image_Region { + /** X coordinate of the start point, in pixels. */ + uint32_t x; + /** Y coordinate of the start point, in pixels. */ + uint32_t y; + /** Width of the region, in pixels. */ + uint32_t width; + /** Height of the region, in pixels. */ + uint32_t height; +}; + +/** + * @brief Declaration the image region. + * + * @since 12 + */ +typedef struct Image_Region Image_Region; + +/** + * @brief Defines the region of the image source to decode. + * + * @since 12 + */ +struct Image_String { + /** data for string type */ + char *data = nullptr; + /** data lenth for string type */ + size_t size = 0; +}; + +/** + * @brief Defines the property string (in key-value format) of the image source. + * + * @since 12 + */ +typedef struct Image_String Image_String; + +/** + * @brief Defines the image encode format. + * + * @since 12 + */ +typedef struct Image_String Image_MimeType; + +/** + * @brief Enumerates the return values that may be used by the interface. + * + * @since 12 + */ +typedef enum { + IMAGE_SUCCESS = 0, // Operation success + IMAGE_BAD_PARAMETER = 401, // Invalid parameter + IMAGE_UNSUPPORTED_MIMETYPE = 7600101, // unsupported mime type + IMAGE_UNKNOWN_MIMETYPE = 7600102, // unknown mime type + IMAGE_TOO_LARGE = 7600103, // too large data or image + IMAGE_UNSUPPORTED_OPERATION = 7600201, // unsupported operations + IMAGE_UNSUPPORTED_METADATA = 7600202, // unsupported metadata + IMAGE_UNSUPPORTED_CONVERSION = 7600203, // unsupported conversion + IMAGE_INVALID_REGION = 7600204, // invalid region + IMAGE_ALLOC_FAILED = 7600301, // failed to allocate memory + IMAGE_COPY_FAILED = 7600302, // memory copy failed + IMAGE_UNKNOWN_ERROR = 7600901, // unknown error + IMAGE_BAD_SOURCE = 7700101, // decode data source exception + IMAGE_DECODE_FAILED = 7700301, // decode failed + IMAGE_ENCODE_FAILED = 7800301, // encode failed +} Image_ErrorCode; + +/** + * @brief Defines the bmp mime type. + * + * @since 12 + */ +static const char* MIME_TYPE_BMP = "image/bmp"; + +/** + * @brief Defines the jpeg mime type. + * + * @since 12 + */ +static const char* MIME_TYPE_JPEG = "image/jpeg"; + +/** + * @brief Defines the heic mime type. + * + * @since 12 + */ +static const char* MIME_TYPE_HEIC = "image/heic"; + +/** + * @brief Defines the png mime type. + * + * @since 12 + */ +static const char* MIME_TYPE_PNG = "image/png"; + +/** + * @brief Defines the webp mime type. + * + * @since 12 + */ +static const char* MIME_TYPE_WEBP = "image/webp"; + +/** + * @brief Defines the gif mime type. + * + * @since 12 + */ +static const char* MIME_TYPE_GIF = "image/gif"; + +/** + * @brief Defines the x-icon mime type. + * + * @since 12 + */ +static const char* MIME_TYPE_ICON = "image/x-icon"; + +/** + * @brief Defines a pointer to bits per sample, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = "BitsPerSample"; + +/** + * @brief Defines a pointer to the orientation, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_ORIENTATION = "Orientation"; + +/** + * @brief Defines a pointer to the image length, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = "ImageLength"; + +/** + * @brief Defines a pointer to the image width, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = "ImageWidth"; + +/** + * @brief Defines a pointer to the GPS latitude, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_LATITUDE = "GPSLatitude"; + +/** + * @brief Defines a pointer to the GPS longitude, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = "GPSLongitude"; + +/** + * @brief Defines a pointer to the GPS latitude reference information, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = "GPSLatitudeRef"; + +/** + * @brief Defines a pointer to the GPS longitude reference information, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = "GPSLongitudeRef"; + +/** + * @brief Defines a pointer to the created date and time, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = "DateTimeOriginal"; + +/** + * @brief Defines a pointer to the exposure time, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = "ExposureTime"; + +/** + * @brief Defines a pointer to the scene type, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SCENE_TYPE = "SceneType"; + +/** + * @brief Defines a pointer to the ISO speed ratings, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = "ISOSpeedRatings"; + +/** + * @brief Defines a pointer to the f-number of the image, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_F_NUMBER = "FNumber"; + +/** + * @brief Defines a pointer to the compressed bits per pixel, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = "CompressedBitsPerPixel"; + +/** + * @brief The scheme used for image compression. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_COMPRESSION = "Compression"; + +/** + * @brief Pixel composition, such as RGB or YCbCr. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_PHOTOMETRIC_INTERPRETATION = "PhotometricInterpretation"; + +/** + * @brief For each strip, the byte offset of that strip. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_STRIP_OFFSETS = "StripOffsets"; + +/** + * @brief The number of components per pixel. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SAMPLES_PER_PIXEL = "SamplesPerPixel"; + +/** + * @brief The number of rows per strip of image data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_ROWS_PER_STRIP = "RowsPerStrip"; + +/** + * @brief The total number of bytes in each strip of image data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_STRIP_BYTE_COUNTS = "StripByteCounts"; + +/** + * @brief The image resolution in the width direction. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_X_RESOLUTION = "XResolution"; + +/** + * @brief The image resolution in the height direction. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_Y_RESOLUTION = "YResolution"; + +/** + * @brief Indicates whether pixel components are recorded in a chunky or planar format. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_PLANAR_CONFIGURATION = "PlanarConfiguration"; + +/** + * @brief The unit used to measure XResolution and YResolution. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_RESOLUTION_UNIT = "ResolutionUnit"; + +/** + * @brief The transfer function for the image, typically used for color correction. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_TRANSFER_FUNCTION = "TransferFunction"; + +/** + * @brief The name and version of the software used to generate the image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SOFTWARE = "Software"; + +/** + * @brief The name of the person who created the image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_ARTIST = "Artist"; + +/** + * @brief The chromaticity of the white point of the image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_WHITE_POINT = "WhitePoint"; + +/** + * @brief The chromaticity of the primary colors of the image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_PRIMARY_CHROMATICITIES = "PrimaryChromaticities"; + +/** + * @brief The matrix coefficients for transformation from RGB to YCbCr image data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_YCBCR_COEFFICIENTS = "YCbCrCoefficients"; + +/** + * @brief The sampling ratio of chrominance components to the luminance component. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_YCBCR_SUB_SAMPLING = "YCbCrSubSampling"; + +/** + * @brief The position of chrominance components in relation to the luminance component. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_YCBCR_POSITIONING = "YCbCrPositioning"; + +/** + * @brief The reference black point value and reference white point value. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_REFERENCE_BLACK_WHITE = "ReferenceBlackWhite"; + +/** + * @brief Copyright information for the image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_COPYRIGHT = "Copyright"; + +/** + * @brief The offset to the start byte (SOI) of JPEG compressed thumbnail data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT = "JPEGInterchangeFormat"; + +/** + * @brief The number of bytes of JPEG compressed thumbnail data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT_LENGTH = "JPEGInterchangeFormatLength"; + +/** + * @brief The class of the program used by the camera to set exposure when the picture is taken. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_EXPOSURE_PROGRAM = "ExposureProgram"; + +/** + * @brief Indicates the spectral sensitivity of each channel of the camera used. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SPECTRAL_SENSITIVITY = "SpectralSensitivity"; + +/** + * @brief Indicates the Opto-Electric Conversion Function (OECF) specified in ISO 14524. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_OECF = "OECF"; + +/** + * @brief The version of the Exif standard supported. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_EXIF_VERSION = "ExifVersion"; + +/** + * @brief The date and time when the image was stored as digital data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_DATE_TIME_DIGITIZED = "DateTimeDigitized"; + +/** + * @brief Information specific to compressed data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_COMPONENTS_CONFIGURATION = "ComponentsConfiguration"; + +/** + * @brief The shutter speed, expressed as an APEX (Additive System of Photographic Exposure) value. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SHUTTER_SPEED_VALUE = "ShutterSpeedValue"; + +/** + * @brief The brightness value of the image, in APEX units. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_BRIGHTNESS_VALUE = "BrightnessValue"; + +/** + * @brief The smallest F number of lens. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_MAX_APERTURE_VALUE = "MaxApertureValue"; + +/** + * @brief The distance to the subject, measured in meters. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE = "SubjectDistance"; + +/** + * @brief This tag indicate the location and area of the main subject in the overall scene. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SUBJECT_AREA = "SubjectArea"; + +/** + * @brief A tag for manufacturers of Exif/DCF writers to record any desired infomation. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_MAKER_NOTE = "MakerNote"; + +/** + * @brief A tag for record fractions of seconds for the DateTime tag. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SUBSEC_TIME = "SubsecTime"; + +/** + * @brief A tag used to record fractions of seconds for the DateTimeOriginal tag. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SUBSEC_TIME_ORIGINAL = "SubsecTimeOriginal"; + +/** + * @brief A tag used to record fractions of seconds for the DateTimeDigitized tag. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SUBSEC_TIME_DIGITIZED = "SubsecTimeDigitized"; + +/** + * @brief This tag denotes the Flashpix format version supported by an FPXR file, enhancing device compatibility. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FLASHPIX_VERSION = "FlashpixVersion"; + +/** + * @brief The color space information tag, often recorded as the color space specifier. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_COLOR_SPACE = "ColorSpace"; + +/** + * @brief The name of an audio file related to the image data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_RELATED_SOUND_FILE = "RelatedSoundFile"; + +/** + * @brief Strobe energy at image capture, in BCPS. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FLASH_ENERGY = "FlashEnergy"; + +/** + * @brief Camera or input device spatial frequency table. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SPATIAL_FREQUENCY_RESPONSE = "SpatialFrequencyResponse"; + +/** + * @brief Pixels per FocalPlaneResolutionUnit in the image width. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FOCAL_PLANE_X_RESOLUTION = "FocalPlaneXResolution"; + +/** + * @brief Pixels per FocalPlaneResolutionUnit in the image height. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FOCAL_PLANE_Y_RESOLUTION = "FocalPlaneYResolution"; + +/** + * @brief Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FOCAL_PLANE_RESOLUTION_UNIT = "FocalPlaneResolutionUnit"; + +/** + * @brief Location of the main subject, relative to the left edge. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SUBJECT_LOCATION = "SubjectLocation"; + +/** + * @brief Selected exposure index at capture. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_EXPOSURE_INDEX = "ExposureIndex"; + +/** + * @brief Image sensor type on the camera. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SENSING_METHOD = "SensingMethod"; + +/** + * @brief Indicates the image source. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FILE_SOURCE = "FileSource"; + +/** + * @brief Color filter array (CFA) geometric pattern of the image sensor. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_CFA_PATTERN = "CFAPattern"; + +/** + * @brief Indicates special processing on image data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_CUSTOM_RENDERED = "CustomRendered"; + +/** + * @brief Exposure mode set when the image was shot. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_EXPOSURE_MODE = "ExposureMode"; + +/** + * @brief Digital zoom ratio at the time of capture. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_DIGITAL_ZOOM_RATIO = "DigitalZoomRatio"; + +/** + * @brief Type of scene captured. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SCENE_CAPTURE_TYPE = "SceneCaptureType"; + +/** + * @brief Degree of overall image gain adjustment. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GAIN_CONTROL = "GainControl"; + +/** + * @brief Direction of contrast processing applied by the camera. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_CONTRAST = "Contrast"; + +/** + * @brief Direction of saturation processing applied by the camera. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SATURATION = "Saturation"; + +/** + * @brief The direction of sharpness processing applied by the camera. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SHARPNESS = "Sharpness"; + +/** + * @brief Information on picture-taking conditions for a specific camera model. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_DEVICE_SETTING_DESCRIPTION = "DeviceSettingDescription"; + +/** + * @brief Indicates the distance range to the subject. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE_RANGE = "SubjectDistanceRange"; + +/** + * @brief An identifier uniquely assigned to each image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_IMAGE_UNIQUE_ID = "ImageUniqueID"; + +/** + * @brief The version of the GPSInfoIFD. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_VERSION_ID = "GPSVersionID"; + +/** + * @brief Reference altitude used for GPS altitude. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_ALTITUDE_REF = "GPSAltitudeRef"; + +/** + * @brief The altitude based on the reference in GPSAltitudeRef. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_ALTITUDE = "GPSAltitude"; + +/** + * @brief The GPS satellites used for measurements. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_SATELLITES = "GPSSatellites"; + +/** + * @brief The status of the GPS receiver when the image is recorded. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_STATUS = "GPSStatus"; + +/** + * @brief The GPS measurement mode. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_MEASURE_MODE = "GPSMeasureMode"; + +/** + * @brief The GPS DOP (data degree of precision). + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_DOP = "GPSDOP"; + +/** + * @brief The unit used to express the GPS receiver speed of movement. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_SPEED_REF = "GPSSpeedRef"; + +/** + * @brief The speed of GPS receiver movement. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_SPEED = "GPSSpeed"; + +/** + * @brief The reference for giving the direction of GPS receiver movement. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_TRACK_REF = "GPSTrackRef"; + +/** + * @brief The direction of GPS receiver movement. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_TRACK = "GPSTrack"; + +/** + * @brief The reference for the image's direction. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION_REF = "GPSImgDirectionRef"; + +/** + * @brief The direction of the image when captured. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION = "GPSImgDirection"; + +/** + * @brief Geodetic survey data used by the GPS receiver. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_MAP_DATUM = "GPSMapDatum"; + +/** + * @brief Indicates the latitude reference of the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE_REF = "GPSDestLatitudeRef"; + +/** + * @brief The latitude of the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE = "GPSDestLatitude"; + +/** + * @brief Indicates the longitude reference of the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE_REF = "GPSDestLongitudeRef"; + +/** + * @brief A character string recording the name of the method used for location finding. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_PROCESSING_METHOD = "GPSProcessingMethod"; + +/** + * @brief A character string recording the name of the GPS area. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_AREA_INFORMATION = "GPSAreaInformation"; + +/** + * @brief This field denotes if differential correction was applied to GPS data, crucial for precise location accuracy. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_DIFFERENTIAL = "GPSDifferential"; + +/** + * @brief The serial number of the camera body. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_BODY_SERIAL_NUMBER = "BodySerialNumber"; + +/** + * @brief The name of the camera owner. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_CAMERA_OWNER_NAME = "CameraOwnerName"; + +/** + * @brief The name of the camera owner. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_COMPOSITE_IMAGE = "CompositeImage"; + +/** + * @brief The DNGVersion tag encodes the four-tier version number for DNG specification compliance. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_DNG_VERSION = "DNGVersion"; + +/** + * @brief The longitude of the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE = "GPSDestLongitude"; + +/** + * @brief The reference for the bearing to the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING_REF = "GPSDestBearingRef"; + +/** + * @brief The bearing to the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING = "GPSDestBearing"; + +/** + * @brief The measurement unit for the distance to the target point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE_REF = "GPSDestDistanceRef"; + +/** + * @brief The distance to the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE = "GPSDestDistance"; + +/** + * @brief DefaultCropSize specifies the final image size in raw coordinates, accounting for extra edge pixels. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_DEFAULT_CROP_SIZE = "DefaultCropSize"; + +/** + * @brief Indicates the value of coefficient gamma. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GAMMA = "Gamma"; + +/** + * @brief The tag indicate the ISO speed latitude yyy value of the camera or input device that is defined in ISO 12232. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEYYY = "ISOSpeedLatitudeyyy"; + +/** + * @brief The tag indicate the ISO speed latitude zzz value of the camera or input device that is defined in ISO 12232. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDEZZZ = "ISOSpeedLatitudezzz"; + +/** + * @brief The manufacturer of the lens. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_LENS_MAKE = "LensMake"; + +/** + * @brief The model name of the lens. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_LENS_MODEL = "LensModel"; + +/** + * @brief The serial number of the lens. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_LENS_SERIAL_NUMBER = "LensSerialNumber"; + +/** + * @brief Specifications of the lens used. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_LENS_SPECIFICATION = "LensSpecification"; + +/** + * @brief This tag provides a broad description of the data type in this subfile. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_NEW_SUBFILE_TYPE = "NewSubfileType"; + +/** + * @brief This tag records the UTC offset for the DateTime tag, ensuring accurate timestamps regardless of location. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_OFFSET_TIME = "OffsetTime"; + +/** + * @brief This tag logs the UTC offset when the image was digitized, aiding in accurate timestamp adjustment. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_OFFSET_TIME_DIGITIZED = "OffsetTimeDigitized"; + +/** + * @brief This tag records the UTC offset when the original image was created, crucial for time-sensitive applications. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_OFFSET_TIME_ORIGINAL = "OffsetTimeOriginal"; + +/** + * @brief Exposure times of source images for a composite image. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE = "SourceExposureTimesOfCompositeImage"; + +/** + * @brief The number of source images used for a composite image. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE = "SourceImageNumberOfCompositeImage"; + +/** + * @brief This deprecated field signifies the type of data in this subfile. Use the NewSubfileType field instead. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SUBFILE_TYPE = "SubfileType"; + +/** + * @brief This tag indicates horizontal positioning errors in meters. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_GPS_H_POSITIONING_ERROR = "GPSHPositioningError"; + +/** + * @brief This tag indicates the sensitivity of the camera or input device when the image was shot. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_PHOTOGRAPHIC_SENSITIVITY = "PhotographicSensitivity"; + +/** + * @brief Burst Number + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_BURST_NUMBER = "HwMnoteBurstNumber"; + +/** + * @brief Face Conf + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FACE_CONF = "HwMnoteFaceConf"; + +/** + * @brief Face Leye Center + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FACE_LEYE_CENTER = "HwMnoteFaceLeyeCenter"; + +/** + * @brief Face Mouth Center + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FACE_MOUTH_CENTER = "HwMnoteFaceMouthCenter"; + +/** + * @brief Face Pointer + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FACE_POINTER = "HwMnoteFacePointer"; + +/** + * @brief Face Rect + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FACE_RECT = "HwMnoteFaceRect"; + +/** + * @brief Face Reye Center + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FACE_REYE_CENTER = "HwMnoteFaceReyeCenter"; + +/** + * @brief Face Smile Score + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FACE_SMILE_SCORE = "HwMnoteFaceSmileScore"; + +/** + * @brief Face Version + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FACE_VERSION = "HwMnoteFaceVersion"; + +/** + * @brief Front Camera + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_FRONT_CAMERA = "HwMnoteFrontCamera"; + +/** + * @brief Scene Pointer + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SCENE_POINTER = "HwMnoteScenePointer"; + +/** + * @brief Scene Version + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @since 12 + */ +static const char *OHOS_IMAGE_PROPERTY_SCENE_VERSION = "HwMnoteSceneVersion"; +#ifdef __cplusplus +}; +#endif +/** @} */ + +#endif // INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_COMMON_H_ \ No newline at end of file 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..17527fcc8 --- /dev/null +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -0,0 +1,198 @@ +/* + * 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 libohimagepacker.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 + */ +typedef struct OH_ImagePackerNative OH_ImagePackerNative; + +/** + * @brief Defines the image packing options. + * + * @since 12 + */ +typedef struct OH_PackingOptions OH_PackingOptions; + +/** + * @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 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_ImageSource *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_Pixelmap *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_ImageSource *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_Pixelmap *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..063c7cf89 --- /dev/null +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -0,0 +1,377 @@ +/* + * 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 libohimagesource.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 + */ +typedef struct OH_ImageSourceNative OH_ImageSourceNative; + +/** + * @brief Defines image source infomation + * {@link OH_ImageSourceNative_CreateImageInfo}. + * + * @since 12 + */ +typedef struct OH_ImageSource_Info OH_ImageSource_Info; + +/** + * @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 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_Create}. + * + * @since 12 + */ +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 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_ImageSource_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_ImageSource_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_Pixelmap **pixepmap); + +/** + * @brief Decodes an void pointer + * the Pixelmap objects at the C++ native layer + * based on the specified {@link OH_ImageSource_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_ImageSource_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_Pixelmap *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_ImageSource} 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..37b0148a2 --- /dev/null +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -0,0 +1,453 @@ +/* + * 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 libohpixelmap.z.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 + */ +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_PREMUL = 2, + /* + * Unpremultiplied format + */ + PIXELMAP_ALPHA_TYPE_UNPEMUL = 3, +}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 + */ +typedef struct OH_Pixelmap_InitializationOptions OH_Pixelmap_InitializationOptions; + +/** + * @brief Create a for InitializationOtions struct. + * + * @param ops The InitializationOtions pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_InitializationOptions + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_Create(OH_Pixelmap_InitializationOptions **ops); + +/** + * @brief Get width number for InitializationOtions struct. + * + * @param ops The InitializationOtions pointer will be operated. + * @param width the number of image width. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_InitializationOptions + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_GetWidth(OH_Pixelmap_InitializationOptions *ops, + uint32_t *width); + +/** + * @brief Set width number for InitializationOtions struct. + * + * @param ops The InitializationOtions pointer will be operated. + * @param width the number of image width. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_InitializationOptions + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_SetWidth(OH_Pixelmap_InitializationOptions *ops, + uint32_t width); + +/** + * @brief Get height number for InitializationOtions struct. + * + * @param ops The InitializationOtions pointer will be operated. + * @param height the number of image height. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_InitializationOptions + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_GetHeight(OH_Pixelmap_InitializationOptions *ops, + uint32_t *height); + +/** + * @brief Set height number for InitializationOtions struct. + * + * @param ops The InitializationOtions pointer will be operated. + * @param height the number of image height. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_InitializationOptions + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_SetHeight(OH_Pixelmap_InitializationOptions *ops, + uint32_t height); + +/** + * @brief Get pixelFormat number for InitializationOtions struct. + * + * @param ops The InitializationOtions pointer will be operated. + * @param pixelFormat the number of image pixelFormat. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_InitializationOptions + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_GetPixelFormat(OH_Pixelmap_InitializationOptions *ops, + int32_t *pixelFormat); + +/** + * @brief Set pixelFormat number for InitializationOtions struct. + * + * @param ops The InitializationOtions pointer will be operated. + * @param pixelFormat the number of image pixelFormat. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_InitializationOptions + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_SetPixelFormat(OH_Pixelmap_InitializationOptions *ops, + int32_t pixelFormat); + +/** + * @brief Get alphaType number for InitializationOtions struct. + * + * @param ops The InitializationOtions pointer will be operated. + * @param alphaType the number of image alphaType. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_InitializationOptions + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_GetAlphaType(OH_Pixelmap_InitializationOptions *ops, + int32_t *alphaType); + +/** + * @brief Set alphaType number for InitializationOtions struct. + * + * @param ops The InitializationOtions pointer will be operated. + * @param alphaType the number of image alphaType. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_InitializationOptions + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_SetAlphaType(OH_Pixelmap_InitializationOptions *ops, + int32_t alphaType); + +/** + * @brief delete InitializationOtions pointer. + * + * @param ops The InitializationOtions pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_InitializationOptions + * @since 12 + */ +Image_ErrorCode OH_PixelmapInitializationOptions_Release(OH_Pixelmap_InitializationOptions *ops); + +/** + * @brief Defines the pixel map information. + * + * @since 12 + */ +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} + * @see OH_Pixelmap_ImageInfo + * @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} + * @see OH_Pixelmap_ImageInfo + * @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} + * @see OH_Pixelmap_ImageInfo + * @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} + * @see OH_Pixelmap_ImageInfo + * @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} + * @see OH_Pixelmap_ImageInfo + * @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} + * @see OH_Pixelmap_ImageInfo + * @since 12 + */ +Image_ErrorCode OH_PixelmapImageInfo_GetAlphaType(OH_Pixelmap_ImageInfo *info, int32_t *alphaType); + +/** + * @brief Delete imageinfo struct pointer. + * + * @param info The imageinfo pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap_ImageInfo + * @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} + * @see OH_Pixelmap_InitializationOptions OH_Pixelmap + * @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_Pixelmap + * @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_Pixelmap + * @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_Pixelmap 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_Pixelmap + * @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_Pixelmap + * @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_Pixelmap + * @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_Pixelmap + * @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_Pixelmap + * @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_Pixelmap + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_Crop(OH_PixelmapNative *pixelmap, Image_Region *region); + +/** + * @brief Releases an OH_Pixelmap object. + * + * @param pixelmap The Pixelmap pointer will be operated. + * @return Returns {@link Image_ErrorCode} + * @see OH_Pixelmap + * @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 From 5255b21647d7899495cf51b46a97a367d027a176 Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 16:28:16 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- .../include/image/image_packer_native.h | 2 +- .../include/image/image_source_native.h | 14 ++--- .../include/image/pixelmap_native.h | 59 +++++++------------ 3 files changed, 29 insertions(+), 46 deletions(-) diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h index 17527fcc8..a20587494 100644 --- a/multimedia/image_framework/include/image/image_packer_native.h +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -27,7 +27,7 @@ * * @brief Declares APIs for encoding image into data or file. * - * @library libohimagepacker.so + * @library libimage_packer.so * @syscap SystemCapability.Multimedia.Image.ImagePacker * @since 12 */ diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 063c7cf89..21f61b94a 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -27,7 +27,7 @@ * * @brief Declares APIs for decoding an image source into a pixel map. * - * @library libohimagesource.so + * @library libimage_source.so * @syscap SystemCapability.Multimedia.Image.ImageSource * @since 12 */ @@ -52,7 +52,7 @@ typedef struct OH_ImageSourceNative OH_ImageSourceNative; /** * @brief Defines image source infomation - * {@link OH_ImageSourceNative_CreateImageInfo}. + * {@link OH_ImageSourceInfo_Create}. * * @since 12 */ @@ -98,7 +98,7 @@ 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_Create}. + * It is used in {@link OH_ImageSourceNative_CreatePixelmap}. * * @since 12 */ @@ -272,11 +272,11 @@ Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile(RawFileDescriptor *rawFil /** * @brief Decodes an void pointer - * based on the specified {@link OH_ImageSource_DecodingOptions} struct. + * 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_ImageSource_DecodingOptions}. + * 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 @@ -287,11 +287,11 @@ Image_ErrorCode OH_ImageSourceNative_CreatePixelmap(OH_ImageSourceNative *source /** * @brief Decodes an void pointer * the Pixelmap objects at the C++ native layer - * based on the specified {@link OH_ImageSource_DecodingOptions} struct. + * 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_ImageSource_DecodingOptions}. + * 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}. diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 37b0148a2..936188854 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -28,7 +28,7 @@ * * @brief Declares the APIs that can access a pixel map. * - * @library libohpixelmap.z.so + * @library libpixelmap.so * @Syscap SystemCapability.Multimedia.Image.Core * @since 12 */ @@ -121,118 +121,108 @@ typedef struct OH_Pixelmap_InitializationOptions OH_Pixelmap_InitializationOptio /** * @brief Create a for InitializationOtions struct. * - * @param ops The InitializationOtions pointer will be operated. + * @param options The InitializationOtions pointer will be operated. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions * @since 12 */ -Image_ErrorCode OH_PixelmapInitializationOptions_Create(OH_Pixelmap_InitializationOptions **ops); +Image_ErrorCode OH_PixelmapInitializationOptions_Create(OH_Pixelmap_InitializationOptions **options); /** * @brief Get width number for InitializationOtions struct. * - * @param ops The InitializationOtions pointer will be operated. + * @param options The InitializationOtions pointer will be operated. * @param width the number of image width. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions * @since 12 */ -Image_ErrorCode OH_PixelmapInitializationOptions_GetWidth(OH_Pixelmap_InitializationOptions *ops, +Image_ErrorCode OH_PixelmapInitializationOptions_GetWidth(OH_Pixelmap_InitializationOptions *options, uint32_t *width); /** * @brief Set width number for InitializationOtions struct. * - * @param ops The InitializationOtions pointer will be operated. + * @param options The InitializationOtions pointer will be operated. * @param width the number of image width. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions * @since 12 */ -Image_ErrorCode OH_PixelmapInitializationOptions_SetWidth(OH_Pixelmap_InitializationOptions *ops, +Image_ErrorCode OH_PixelmapInitializationOptions_SetWidth(OH_Pixelmap_InitializationOptions *options, uint32_t width); /** * @brief Get height number for InitializationOtions struct. * - * @param ops The InitializationOtions pointer will be operated. + * @param options The InitializationOtions pointer will be operated. * @param height the number of image height. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions * @since 12 */ -Image_ErrorCode OH_PixelmapInitializationOptions_GetHeight(OH_Pixelmap_InitializationOptions *ops, +Image_ErrorCode OH_PixelmapInitializationOptions_GetHeight(OH_Pixelmap_InitializationOptions *options, uint32_t *height); /** * @brief Set height number for InitializationOtions struct. * - * @param ops The InitializationOtions pointer will be operated. + * @param options The InitializationOtions pointer will be operated. * @param height the number of image height. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions * @since 12 */ -Image_ErrorCode OH_PixelmapInitializationOptions_SetHeight(OH_Pixelmap_InitializationOptions *ops, +Image_ErrorCode OH_PixelmapInitializationOptions_SetHeight(OH_Pixelmap_InitializationOptions *options, uint32_t height); /** * @brief Get pixelFormat number for InitializationOtions struct. * - * @param ops The InitializationOtions pointer will be operated. + * @param options The InitializationOtions pointer will be operated. * @param pixelFormat the number of image pixelFormat. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions * @since 12 */ -Image_ErrorCode OH_PixelmapInitializationOptions_GetPixelFormat(OH_Pixelmap_InitializationOptions *ops, +Image_ErrorCode OH_PixelmapInitializationOptions_GetPixelFormat(OH_Pixelmap_InitializationOptions *options, int32_t *pixelFormat); /** * @brief Set pixelFormat number for InitializationOtions struct. * - * @param ops The InitializationOtions pointer will be operated. + * @param options The InitializationOtions pointer will be operated. * @param pixelFormat the number of image pixelFormat. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions * @since 12 */ -Image_ErrorCode OH_PixelmapInitializationOptions_SetPixelFormat(OH_Pixelmap_InitializationOptions *ops, +Image_ErrorCode OH_PixelmapInitializationOptions_SetPixelFormat(OH_Pixelmap_InitializationOptions *options, int32_t pixelFormat); /** * @brief Get alphaType number for InitializationOtions struct. * - * @param ops The InitializationOtions pointer will be operated. + * @param options The InitializationOtions pointer will be operated. * @param alphaType the number of image alphaType. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions * @since 12 */ -Image_ErrorCode OH_PixelmapInitializationOptions_GetAlphaType(OH_Pixelmap_InitializationOptions *ops, +Image_ErrorCode OH_PixelmapInitializationOptions_GetAlphaType(OH_Pixelmap_InitializationOptions *options, int32_t *alphaType); /** * @brief Set alphaType number for InitializationOtions struct. * - * @param ops The InitializationOtions pointer will be operated. + * @param options The InitializationOtions pointer will be operated. * @param alphaType the number of image alphaType. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions * @since 12 */ -Image_ErrorCode OH_PixelmapInitializationOptions_SetAlphaType(OH_Pixelmap_InitializationOptions *ops, +Image_ErrorCode OH_PixelmapInitializationOptions_SetAlphaType(OH_Pixelmap_InitializationOptions *options, int32_t alphaType); /** * @brief delete InitializationOtions pointer. * - * @param ops The InitializationOtions pointer will be operated. + * @param options The InitializationOtions pointer will be operated. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions * @since 12 */ -Image_ErrorCode OH_PixelmapInitializationOptions_Release(OH_Pixelmap_InitializationOptions *ops); +Image_ErrorCode OH_PixelmapInitializationOptions_Release(OH_Pixelmap_InitializationOptions *options); /** * @brief Defines the pixel map information. @@ -246,7 +236,6 @@ typedef struct OH_Pixelmap_ImageInfo OH_Pixelmap_ImageInfo; * * @param info The imageinfo pointer will be operated. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_ImageInfo * @since 12 */ Image_ErrorCode OH_PixelmapImageInfo_Create(OH_Pixelmap_ImageInfo **info); @@ -257,7 +246,6 @@ Image_ErrorCode OH_PixelmapImageInfo_Create(OH_Pixelmap_ImageInfo **info); * @param info The imageinfo pointer will be operated. * @param width The number of imageinfo width. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_ImageInfo * @since 12 */ Image_ErrorCode OH_PixelmapImageInfo_GetWidth(OH_Pixelmap_ImageInfo *info, uint32_t *width); @@ -268,7 +256,6 @@ Image_ErrorCode OH_PixelmapImageInfo_GetWidth(OH_Pixelmap_ImageInfo *info, uint3 * @param info The imageinfo pointer will be operated. * @param height The number of imageinfo height. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_ImageInfo * @since 12 */ Image_ErrorCode OH_PixelmapImageInfo_GetHeight(OH_Pixelmap_ImageInfo *info, uint32_t *height); @@ -279,7 +266,6 @@ Image_ErrorCode OH_PixelmapImageInfo_GetHeight(OH_Pixelmap_ImageInfo *info, uint * @param info The imageinfo pointer will be operated. * @param rowStride The number of imageinfo rowStride. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_ImageInfo * @since 12 */ Image_ErrorCode OH_PixelmapImageInfo_GetRowStride(OH_Pixelmap_ImageInfo *info, uint32_t *rowStride); @@ -290,7 +276,6 @@ Image_ErrorCode OH_PixelmapImageInfo_GetRowStride(OH_Pixelmap_ImageInfo *info, u * @param info The imageinfo pointer will be operated. * @param pixelFormat The number of imageinfo pixelFormat. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_ImageInfo * @since 12 */ Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat(OH_Pixelmap_ImageInfo *info, int32_t *pixelFormat); @@ -301,7 +286,6 @@ Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat(OH_Pixelmap_ImageInfo *info, * @param info The imageinfo pointer will be operated. * @param density The number of imageinfo density. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_ImageInfo * @since 12 */ Image_ErrorCode OH_PixelmapImageInfo_GetAlphaType(OH_Pixelmap_ImageInfo *info, int32_t *alphaType); @@ -311,7 +295,6 @@ Image_ErrorCode OH_PixelmapImageInfo_GetAlphaType(OH_Pixelmap_ImageInfo *info, i * * @param info The imageinfo pointer will be operated. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_ImageInfo * @since 12 */ Image_ErrorCode OH_PixelmapImageInfo_Release(OH_Pixelmap_ImageInfo *info); -- Gitee From a93739a284660d8c37be742f88537846351ce792 Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 16:34:53 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=BD=93=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/include/image/image_packer_native.h | 2 ++ multimedia/image_framework/include/image/image_source_native.h | 3 +++ multimedia/image_framework/include/image/pixelmap_native.h | 3 +++ 3 files changed, 8 insertions(+) diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h index a20587494..512293ed3 100644 --- a/multimedia/image_framework/include/image/image_packer_native.h +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -47,6 +47,7 @@ extern "C" { * * @since 12 */ +struct OH_ImagePackerNative; typedef struct OH_ImagePackerNative OH_ImagePackerNative; /** @@ -54,6 +55,7 @@ typedef struct OH_ImagePackerNative OH_ImagePackerNative; * * @since 12 */ +struct OH_PackingOptions; typedef struct OH_PackingOptions OH_PackingOptions; /** diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 21f61b94a..1ba408ca0 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -48,6 +48,7 @@ extern "C" { * * @since 12 */ +struct OH_ImageSourceNative; typedef struct OH_ImageSourceNative OH_ImageSourceNative; /** @@ -56,6 +57,7 @@ typedef struct OH_ImageSourceNative OH_ImageSourceNative; * * @since 12 */ +struct OH_ImageSource_Info; typedef struct OH_ImageSource_Info OH_ImageSource_Info; /** @@ -102,6 +104,7 @@ Image_ErrorCode OH_ImageSourceInfo_Release(OH_ImageSource_Info *info); * * @since 12 */ +struct OH_DecodingOptions; typedef struct OH_DecodingOptions OH_DecodingOptions; /** diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 936188854..39a252dc5 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -46,6 +46,7 @@ extern "C" { * * @since 12 */ +struct OH_PixelmapNative; typedef struct OH_PixelmapNative OH_PixelmapNative; /** @@ -116,6 +117,7 @@ typedef enum { * * @since 12 */ +struct OH_Pixelmap_InitializationOptions; typedef struct OH_Pixelmap_InitializationOptions OH_Pixelmap_InitializationOptions; /** @@ -229,6 +231,7 @@ Image_ErrorCode OH_PixelmapInitializationOptions_Release(OH_Pixelmap_Initializat * * @since 12 */ +struct OH_Pixelmap_ImageInfo; typedef struct OH_Pixelmap_ImageInfo OH_Pixelmap_ImageInfo; /** -- Gitee From bfbc4f742ab7e42879cd50163b9f382b44287a99 Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 16:41:06 +0800 Subject: [PATCH 04/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/BUILD.gn | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/multimedia/image_framework/BUILD.gn b/multimedia/image_framework/BUILD.gn index 2aaadcb6a..567b54c88 100644 --- a/multimedia/image_framework/BUILD.gn +++ b/multimedia/image_framework/BUILD.gn @@ -34,8 +34,8 @@ ohos_ndk_library("libpixelmap") { min_compact_version = "12" system_capability = "SystemCapability.Multimedia.Image.Core" system_capability_headers = [ - "./include/image/pixelmap_native.h", - "./include/image/image_common.h", + "multimedia/image_framework/pixelmap_native.h", + "multimedia/image_framework/image_common.h", ] } @@ -90,8 +90,8 @@ ohos_ndk_library("libimage_source") { min_compact_version = "12" system_capability = "SystemCapability.Multimedia.Image.ImageSource" system_capability_headers = [ - "./include/image/image_source_native.h", - "./include/image/image_common.h", + "multimedia/image_framework/image_source_native.h", + "multimedia/image_framework/image_common.h", ] } @@ -118,8 +118,8 @@ ohos_ndk_library("libimage_packer") { min_compact_version = "12" system_capability = "SystemCapability.Multimedia.Image.ImagePacker" system_capability_headers = [ - "./include/image/image_packer_native.h", - "./include/image/image_common.h", + "multimedia/image_framework/image_packer_native.h", + "multimedia/image_framework/image_common.h", ] } -- Gitee From 7f4a57e608ac6cb2dab0ac15512f8f4e82006f28 Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 16:55:20 +0800 Subject: [PATCH 05/19] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/include/image/image_common.h | 2 +- .../image_framework/include/image/image_source_native.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 4e16b5bd1..a2c43ccd6 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -26,7 +26,7 @@ * @file image_common.h * * @brief Declares the common enums and structs used by the image interface. - * + * * @syscap SystemCapability.Multimedia.Image.Core * @since 12 */ diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 1ba408ca0..36e102788 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -18,7 +18,7 @@ * @{ * * @brief Provides APIs for access to the image interface. - * + * * @since 12 */ @@ -283,7 +283,7 @@ Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile(RawFileDescriptor *rawFil * @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_Pixelmap **pixepmap); -- Gitee From df62bc429232de93d0ddf243ae58a2c5234416fc Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 17:54:24 +0800 Subject: [PATCH 06/19] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=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 --- .../include/image/image_packer_native.h | 56 +++++++-- .../include/image/image_source_native.h | 107 +++++++++++++----- .../include/image/pixelmap_native.h | 10 ++ .../image_framework/libimage_packer.ndk.json | 8 ++ .../image_framework/libimage_source.ndk.json | 12 ++ .../image_framework/libpixelmap.ndk.json | 4 + 6 files changed, 161 insertions(+), 36 deletions(-) diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h index 512293ed3..760e961b7 100644 --- a/multimedia/image_framework/include/image/image_packer_native.h +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -58,6 +58,22 @@ typedef struct OH_ImagePackerNative OH_ImagePackerNative; 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. * @@ -68,9 +84,9 @@ typedef struct OH_PackingOptions OH_PackingOptions; Image_ErrorCode OH_PackingOptions_Create(OH_PackingOptions **options); /** - * @brief Get mime type for DecodingOptions struct. + * @brief Get mime type for OH_PackingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_PackingOptions 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} @@ -80,9 +96,9 @@ Image_ErrorCode OH_PackingOptions_GetMimeType(OH_PackingOptions *options, Image_MimeType *format); /** - * @brief Set format number for DecodingOptions struct. + * @brief Set format number for OH_PackingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_PackingOptions pointer will be operated. * @param format the number of image format. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -91,9 +107,9 @@ Image_ErrorCode OH_PackingOptions_SetMimeType(OH_PackingOptions *options, Image_MimeType *format); /** - * @brief Get quality for DecodingOptions struct. + * @brief Get quality for OH_PackingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_PackingOptions pointer will be operated. * @param quality the number of image quality. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -102,9 +118,9 @@ Image_ErrorCode OH_PackingOptions_GetQuality(OH_PackingOptions *options, uint32_t *quality); /** - * @brief Set quality number for DecodingOptions struct. + * @brief Set quality number for OH_PackingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_PackingOptions pointer will be operated. * @param quality the number of image quality. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -113,9 +129,29 @@ Image_ErrorCode OH_PackingOptions_SetQuality(OH_PackingOptions *options, uint32_t quality); /** - * @brief delete DecodingOptions pointer. + * @brief Get desiredDynamicRange for PackingOptions struct. + * + * @param options The PackingOptions pointer will be operated. + * @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PackingOptions_GetDesiredDynamicRange(OH_PackingOptions *options, int32_t* desiredDynamicRange); + +/** + * @brief Set desiredDynamicRange number for PackingOptions struct. + * + * @param options The PackingOptions pointer will be operated. + * @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PackingOptions_SetDesiredDynamicRange(OH_PackingOptions *options, int32_t desiredDynamicRange); + +/** + * @brief delete OH_PackingOptions pointer. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_PackingOptions pointer will be operated. * @return Returns {@link Image_ErrorCode} * @since 12 */ diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 36e102788..35c5c4005 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -60,6 +60,28 @@ typedef struct OH_ImageSourceNative OH_ImageSourceNative; 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. * @@ -72,7 +94,7 @@ 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 info The OH_ImageSource_Info pointer will be operated. * @param width the number of image width. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -82,13 +104,24 @@ Image_ErrorCode OH_ImageSourceInfo_GetWidth(OH_ImageSource_Info *info, uint32_t /** * @brief Get height number for OH_ImageSource_Info struct. * - * @param info The DecodingOptions pointer will be operated. + * @param info The OH_ImageSource_Info 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 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. * @@ -108,18 +141,18 @@ struct OH_DecodingOptions; typedef struct OH_DecodingOptions OH_DecodingOptions; /** - * @brief Create a pointer for InitializationOtions struct. + * @brief Create a pointer for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_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. + * @brief Get pixelFormat number for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @param pixelFormat the number of image pixelFormat. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -128,9 +161,9 @@ Image_ErrorCode OH_DecodingOptions_GetPixelFormat(OH_DecodingOptions *options, int32_t *pixelFormat); /** - * @brief Set pixelFormat number for DecodingOptions struct. + * @brief Set pixelFormat number for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @param pixelFormat the number of image pixelFormat. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -139,9 +172,9 @@ Image_ErrorCode OH_DecodingOptions_SetPixelFormat(OH_DecodingOptions *options, int32_t pixelFormat); /** - * @brief Get index number for DecodingOptions struct. + * @brief Get index number for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @param index the number of image index. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -149,9 +182,9 @@ Image_ErrorCode OH_DecodingOptions_SetPixelFormat(OH_DecodingOptions *options, Image_ErrorCode OH_DecodingOptions_GetIndex(OH_DecodingOptions *options, uint32_t *index); /** - * @brief Set index number for DecodingOptions struct. + * @brief Set index number for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @param index the number of image index. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -159,9 +192,9 @@ Image_ErrorCode OH_DecodingOptions_GetIndex(OH_DecodingOptions *options, uint32_ Image_ErrorCode OH_DecodingOptions_SetIndex(OH_DecodingOptions *options, uint32_t index); /** - * @brief Get rotate number for DecodingOptions struct. + * @brief Get rotate number for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @param rotate the number of image rotate. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -169,9 +202,9 @@ Image_ErrorCode OH_DecodingOptions_SetIndex(OH_DecodingOptions *options, uint32_ Image_ErrorCode OH_DecodingOptions_GetRotate(OH_DecodingOptions *options, float *rotate); /** - * @brief Set rotate number for DecodingOptions struct. + * @brief Set rotate number for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @param rotate the number of image rotate. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -179,9 +212,9 @@ Image_ErrorCode OH_DecodingOptions_GetRotate(OH_DecodingOptions *options, float Image_ErrorCode OH_DecodingOptions_SetRotate(OH_DecodingOptions *options, float rotate); /** - * @brief Get desiredSize number for DecodingOptions struct. + * @brief Get desiredSize number for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @param desiredSize the number of image desiredSize. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -190,9 +223,9 @@ Image_ErrorCode OH_DecodingOptions_GetDesiredSize(OH_DecodingOptions *options, Image_Size *desiredSize); /** - * @brief Set desiredSize number for DecodingOptions struct. + * @brief Set desiredSize number for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @param desiredSize the number of image desiredSize. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -201,9 +234,9 @@ Image_ErrorCode OH_DecodingOptions_SetDesiredSize(OH_DecodingOptions *options, Image_Size *desiredSize); /** - * @brief Set desiredRegion number for DecodingOptions struct. + * @brief Set desiredRegion number for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @param desiredRegion the number of image desiredRegion. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -212,9 +245,9 @@ Image_ErrorCode OH_DecodingOptions_GetDesiredRegion(OH_DecodingOptions *options, Image_Region *desiredRegion); /** - * @brief Set desiredRegion number for DecodingOptions struct. + * @brief Set desiredRegion number for OH_DecodingOptions struct. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @param desiredRegion the number of image desiredRegion. * @return Returns {@link Image_ErrorCode} * @since 12 @@ -223,9 +256,31 @@ Image_ErrorCode OH_DecodingOptions_SetDesiredRegion(OH_DecodingOptions *options, Image_Region *desiredRegion); /** - * @brief delete DecodingOptions pointer. + * @brief Set desiredDynamicRange number for OH_DecodingOptions struct. + * + * @param options The OH_DecodingOptions pointer will be operated. + * @param desiredDynamicRange the number of desired dynamic range {@link IMAGE_DYNAMIC_RANGE}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_GetDesiredDynamicRange(OH_DecodingOptions *options, + int32_t *desiredDynamicRange); + +/** + * @brief Set desiredDynamicRange number for OH_DecodingOptions struct. + * + * @param options The OH_DecodingOptions pointer will be operated. + * @param desiredDynamicRange the number of desired dynamic range {@link IMAGE_DYNAMIC_RANGE}. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_SetDesiredDynamicRange(OH_DecodingOptions *options, + int32_t desiredDynamicRange); + +/** + * @brief delete OH_DecodingOptions pointer. * - * @param options The DecodingOptions pointer will be operated. + * @param options The OH_DecodingOptions pointer will be operated. * @return Returns {@link Image_ErrorCode} * @since 12 */ diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 39a252dc5..d09ddeeb2 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -293,6 +293,16 @@ Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat(OH_Pixelmap_ImageInfo *info, */ Image_ErrorCode OH_PixelmapImageInfo_GetAlphaType(OH_Pixelmap_ImageInfo *info, int32_t *alphaType); +/** + * @brief Get isHdr boolean for imageinfo struct. + * + * @param info The imageinfo pointer will be operated. + * @param isHdr Whether the image has a high dynamic range. + * @return Returns {@link Image_ErrorCode} + * @since 12 + */ +Image_ErrorCode OH_PixelmapImageInfo_GetDynamicRange(OH_Pixelmap_ImageInfo *info, bool *isHdr); + /** * @brief Delete imageinfo struct pointer. * diff --git a/multimedia/image_framework/libimage_packer.ndk.json b/multimedia/image_framework/libimage_packer.ndk.json index 33def951b..c5b00c4ce 100644 --- a/multimedia/image_framework/libimage_packer.ndk.json +++ b/multimedia/image_framework/libimage_packer.ndk.json @@ -19,6 +19,14 @@ "first_introduced": "12", "name": "OH_PackingOptions_SetQuality" }, + { + "first_introduced": "12", + "name": "OH_PackingOptions_GetDesiredDynamicRange" + }, + { + "first_introduced": "12", + "name": "OH_PackingOptions_SetDesiredDynamicRange" + }, { "first_introduced": "12", "name": "OH_PackingOptions_Release" diff --git a/multimedia/image_framework/libimage_source.ndk.json b/multimedia/image_framework/libimage_source.ndk.json index 0c91a11dc..562ec53ca 100644 --- a/multimedia/image_framework/libimage_source.ndk.json +++ b/multimedia/image_framework/libimage_source.ndk.json @@ -11,6 +11,10 @@ "first_introduced": "12", "name": "OH_ImageSourceInfo_GetHeight" }, + { + "first_introduced": "12", + "name": "OH_ImageSourceInfo_GetDynamicRange" + }, { "first_introduced": "12", "name": "OH_ImageSourceInfo_Release" @@ -59,6 +63,14 @@ "first_introduced": "12", "name": "OH_DecodingOptions_SetDesiredRegion" }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_GetDesiredDynamicRange" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_SetDesiredDynamicRange" + }, { "first_introduced": "12", "name": "OH_DecodingOptions_Release" diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index c1c138185..c10325713 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -63,6 +63,10 @@ "first_introduced": "12", "name": "OH_PixelmapImageInfo_GetAlphaType" }, + { + "first_introduced": "12", + "name": "OH_PixelmapImageInfo_GetDynamicRange" + }, { "first_introduced": "12", "name": "OH_PixelmapImageInfo_Release" -- Gitee From b892c3bf302aaf89ea17dab45176707713332ea7 Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 20:35:07 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E6=9B=B4=E6=96=B0common.h=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- .../include/image/image_common.h | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index a2c43ccd6..6dbf79160 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -114,21 +114,36 @@ typedef struct Image_String Image_MimeType; * @since 12 */ typedef enum { - IMAGE_SUCCESS = 0, // Operation success - IMAGE_BAD_PARAMETER = 401, // Invalid parameter - IMAGE_UNSUPPORTED_MIMETYPE = 7600101, // unsupported mime type - IMAGE_UNKNOWN_MIMETYPE = 7600102, // unknown mime type - IMAGE_TOO_LARGE = 7600103, // too large data or image - IMAGE_UNSUPPORTED_OPERATION = 7600201, // unsupported operations - IMAGE_UNSUPPORTED_METADATA = 7600202, // unsupported metadata - IMAGE_UNSUPPORTED_CONVERSION = 7600203, // unsupported conversion - IMAGE_INVALID_REGION = 7600204, // invalid region - IMAGE_ALLOC_FAILED = 7600301, // failed to allocate memory - IMAGE_COPY_FAILED = 7600302, // memory copy failed - IMAGE_UNKNOWN_ERROR = 7600901, // unknown error - IMAGE_BAD_SOURCE = 7700101, // decode data source exception - IMAGE_DECODE_FAILED = 7700301, // decode failed - IMAGE_ENCODE_FAILED = 7800301, // encode failed + /** operation success */ + IMAGE_SUCCESS = 0, + /** invalid parameter */ + IMAGE_BAD_PARAMETER = 401, + /** unsupported mime type */ + IMAGE_UNSUPPORTED_MIMETYPE = 7600101, + /** unknown mime type */ + IMAGE_UNKNOWN_MIMETYPE = 7600102, + /** too large data or image */ + IMAGE_TOO_LARGE = 7600103, + /** unsupported operations */ + IMAGE_UNSUPPORTED_OPERATION = 7600201, + /** unsupported metadata */ + IMAGE_UNSUPPORTED_METADATA = 7600202, + /** unsupported conversion */ + IMAGE_UNSUPPORTED_CONVERSION = 7600203, + /** invalid region */ + IMAGE_INVALID_REGION = 7600204, + /** failed to allocate memory */ + IMAGE_ALLOC_FAILED = 7600301, + /** memory copy failed */ + IMAGE_COPY_FAILED = 7600302, + /** unknown error */ + IMAGE_UNKNOWN_ERROR = 7600901, + /** decode data source exception */ + IMAGE_BAD_SOURCE = 7700101, + /** decode failed */ + IMAGE_DECODE_FAILED = 7700301, + /** encode failed */ + IMAGE_ENCODE_FAILED = 7800301, } Image_ErrorCode; /** -- Gitee From f48a6aa1bfced0d0c25ea3cd2fcd1ca8b8ece178 Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 21:10:41 +0800 Subject: [PATCH 08/19] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- .../image_framework/include/image/image_packer_native.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h index 760e961b7..821c70610 100644 --- a/multimedia/image_framework/include/image/image_packer_native.h +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -110,7 +110,7 @@ Image_ErrorCode OH_PackingOptions_SetMimeType(OH_PackingOptions *options, * @brief Get quality for OH_PackingOptions struct. * * @param options The OH_PackingOptions pointer will be operated. - * @param quality the number of image quality. + * @param quality The number of image quality. * @return Returns {@link Image_ErrorCode} * @since 12 */ @@ -121,7 +121,7 @@ Image_ErrorCode OH_PackingOptions_GetQuality(OH_PackingOptions *options, * @brief Set quality number for OH_PackingOptions struct. * * @param options The OH_PackingOptions pointer will be operated. - * @param quality the number of image quality. + * @param quality The number of image quality. * @return Returns {@link Image_ErrorCode} * @since 12 */ @@ -132,7 +132,7 @@ Image_ErrorCode OH_PackingOptions_SetQuality(OH_PackingOptions *options, * @brief Get desiredDynamicRange for PackingOptions struct. * * @param options The PackingOptions pointer will be operated. - * @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}. + * @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}. * @return Returns {@link Image_ErrorCode} * @since 12 */ @@ -142,7 +142,7 @@ Image_ErrorCode OH_PackingOptions_GetDesiredDynamicRange(OH_PackingOptions *opti * @brief Set desiredDynamicRange number for PackingOptions struct. * * @param options The PackingOptions pointer will be operated. - * @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}. + * @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}. * @return Returns {@link Image_ErrorCode} * @since 12 */ -- Gitee From 1ac2b4c5d39a82f6ee1a76bd5ef5fc528837ced9 Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 21:30:21 +0800 Subject: [PATCH 09/19] =?UTF-8?q?=E5=88=A0=E9=99=A4@see?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- .../image_framework/include/image/pixelmap_native.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index d09ddeeb2..27aa29877 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -320,7 +320,6 @@ Image_ErrorCode OH_PixelmapImageInfo_Release(OH_Pixelmap_ImageInfo *info); * @param options IPixel properties, including the alpha type, size, pixel format, and editable. * @param pixelmap Pixelmap pointer for created. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap_InitializationOptions OH_Pixelmap * @since 12 */ Image_ErrorCode OH_PixelmapNative_CreatePixelmap(uint8_t *data, size_t dataLength, @@ -334,7 +333,6 @@ Image_ErrorCode OH_PixelmapNative_CreatePixelmap(uint8_t *data, size_t dataLengt * @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_Pixelmap * @since 12 */ Image_ErrorCode OH_PixelmapNative_ReadPixels(OH_PixelmapNative *pixelmap, uint8_t *destination, size_t *bufferSize); @@ -346,7 +344,6 @@ Image_ErrorCode OH_PixelmapNative_ReadPixels(OH_PixelmapNative *pixelmap, uint8_ * @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_Pixelmap * @since 12 */ Image_ErrorCode OH_PixelmapNative_WritePixels(OH_PixelmapNative *pixelmap, uint8_t *source, size_t bufferSize); @@ -357,7 +354,6 @@ Image_ErrorCode OH_PixelmapNative_WritePixels(OH_PixelmapNative *pixelmap, uint8 * @param pixelmap The Pixelmap pointer will be operated. * @param imageInfo Indicates the pointer to the image information. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap OH_Pixelmap_ImageInfo * @since 12 */ Image_ErrorCode OH_PixelmapNative_GetImageInfo(OH_PixelmapNative *pixelmap, OH_Pixelmap_ImageInfo *imageInfo); @@ -368,7 +364,6 @@ Image_ErrorCode OH_PixelmapNative_GetImageInfo(OH_PixelmapNative *pixelmap, OH_P * @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_Pixelmap * @since 12 */ Image_ErrorCode OH_PixelmapNative_Opacity(OH_PixelmapNative *pixelmap, float rate); @@ -380,7 +375,6 @@ Image_ErrorCode OH_PixelmapNative_Opacity(OH_PixelmapNative *pixelmap, float rat * @param scaleX Scaling ratio of the width. * @param scaleY Scaling ratio of the height. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap * @since 12 */ Image_ErrorCode OH_PixelmapNative_Scale(OH_PixelmapNative *pixelmap, float scaleX, float scaleY); @@ -392,7 +386,6 @@ Image_ErrorCode OH_PixelmapNative_Scale(OH_PixelmapNative *pixelmap, float scale * @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_Pixelmap * @since 12 */ Image_ErrorCode OH_PixelmapNative_Translate(OH_PixelmapNative *pixelmap, float x, float y); @@ -403,7 +396,6 @@ Image_ErrorCode OH_PixelmapNative_Translate(OH_PixelmapNative *pixelmap, float x * @param pixelmap The Pixelmap pointer will be operated. * @param angle Angle to rotate. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap * @since 12 */ Image_ErrorCode OH_PixelmapNative_Rotate(OH_PixelmapNative *pixelmap, float angle); @@ -415,7 +407,6 @@ Image_ErrorCode OH_PixelmapNative_Rotate(OH_PixelmapNative *pixelmap, float angl * @param shouldFilpHorizontally Whether to flip the image horizontally. * @param shouldFilpVertically Whether to flip the image vertically. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap * @since 12 */ Image_ErrorCode OH_PixelmapNative_Flip(OH_PixelmapNative *pixelmap, bool shouldFilpHorizontally, bool shouldFilpVertically); @@ -426,7 +417,6 @@ Image_ErrorCode OH_PixelmapNative_Flip(OH_PixelmapNative *pixelmap, bool shouldF * @param pixelmap The Pixelmap pointer will be operated. * @param region Area size, read according to area. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap * @since 12 */ Image_ErrorCode OH_PixelmapNative_Crop(OH_PixelmapNative *pixelmap, Image_Region *region); @@ -436,7 +426,6 @@ Image_ErrorCode OH_PixelmapNative_Crop(OH_PixelmapNative *pixelmap, Image_Region * * @param pixelmap The Pixelmap pointer will be operated. * @return Returns {@link Image_ErrorCode} - * @see OH_Pixelmap * @since 12 */ Image_ErrorCode OH_PixelmapNative_Release(OH_PixelmapNative *pixelmap); -- Gitee From 03700d50794aee52fdd9738dc51b138de9bdf6f3 Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 22:52:29 +0800 Subject: [PATCH 10/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- .../image_framework/include/image/image_source_native.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 35c5c4005..6c493e4dc 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -352,12 +352,12 @@ Image_ErrorCode OH_ImageSourceNative_CreatePixelmap(OH_ImageSourceNative *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}. + * @param size 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_Pixelmap *resVecPixMap[], size_t *outSize); + OH_Pixelmap *resVecPixMap[], size_t size); /** * @brief Obtains the delay time list from some ImageSource objects (such as GIF image sources). @@ -368,7 +368,7 @@ Image_ErrorCode OH_ImageSourceNative_CreatePixelmapList(OH_ImageSourceNative *so * @return Returns {@link Image_ErrorCode} * @since 12 */ -Image_ErrorCode OH_ImageSourceNative_GetDelayTimeList(OH_ImageSourceNative *source, int32_t *delayTimeList, size_t *size); +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. -- Gitee From 704b23fb87cc6c7687007703ea57347640010f96 Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 23:03:38 +0800 Subject: [PATCH 11/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- .../image_framework/include/image/image_packer_native.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h index 821c70610..dfe560dcf 100644 --- a/multimedia/image_framework/include/image/image_packer_native.h +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -178,7 +178,7 @@ Image_ErrorCode OH_ImagePackerNative_Create(OH_ImagePackerNative **imagePacker); * @since 12 */ Image_ErrorCode OH_ImagePackerNative_PackToDataFromImageSource(OH_ImagePackerNative *imagePacker, - OH_PackingOptions *options, OH_ImageSource *imageSource, uint8_t *outData, size_t *size); + OH_PackingOptions *options, OH_ImageSourceNative *imageSource, uint8_t *outData, size_t *size); /** * @brief Encoding a Pixelmap into the data with required format. @@ -192,7 +192,7 @@ Image_ErrorCode OH_ImagePackerNative_PackToDataFromImageSource(OH_ImagePackerNat * @since 12 */ Image_ErrorCode OH_ImagePackerNative_PackToDataFromPixelmap(OH_ImagePackerNative *imagePacker, - OH_PackingOptions *options, OH_Pixelmap *pixelmap, uint8_t *outData, size_t *size); + 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. @@ -205,7 +205,7 @@ Image_ErrorCode OH_ImagePackerNative_PackToDataFromPixelmap(OH_ImagePackerNative * @since 12 */ Image_ErrorCode OH_ImagePackerNative_PackToFileFromImageSource(OH_ImagePackerNative *imagePacker, - OH_PackingOptions *options, OH_ImageSource *imageSource, int32_t fd); + OH_PackingOptions *options, OH_ImageSourceNative *imageSource, int32_t fd); /** * @brief Encoding a Pixelmap into the a file with fd with required format @@ -218,7 +218,7 @@ Image_ErrorCode OH_ImagePackerNative_PackToFileFromImageSource(OH_ImagePackerNat * @since 12 */ Image_ErrorCode OH_ImagePackerNative_PackToFileFromPixelmap(OH_ImagePackerNative *imagePacker, - OH_PackingOptions *options, OH_Pixelmap *pixelmap, int32_t fd); + OH_PackingOptions *options, OH_PixelmapNative *pixelmap, int32_t fd); /** * @brief Releases an imagePacker object. -- Gitee From fa23196151e5e88936e515d2b8868391f3059dfd Mon Sep 17 00:00:00 2001 From: yangfan Date: Tue, 9 Apr 2024 23:12:03 +0800 Subject: [PATCH 12/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- .../image_framework/include/image/image_source_native.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 6c493e4dc..14b49ef91 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -340,7 +340,7 @@ Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile(RawFileDescriptor *rawFil * @since 12 */ Image_ErrorCode OH_ImageSourceNative_CreatePixelmap(OH_ImageSourceNative *source, OH_DecodingOptions *options, - OH_Pixelmap **pixepmap); + OH_PixelmapNative **pixepmap); /** * @brief Decodes an void pointer @@ -357,7 +357,7 @@ Image_ErrorCode OH_ImageSourceNative_CreatePixelmap(OH_ImageSourceNative *source * @since 12 */ Image_ErrorCode OH_ImageSourceNative_CreatePixelmapList(OH_ImageSourceNative *source, OH_DecodingOptions *options, - OH_Pixelmap *resVecPixMap[], size_t size); + OH_PixelmapNative *resVecPixMap[], size_t size); /** * @brief Obtains the delay time list from some ImageSource objects (such as GIF image sources). -- Gitee From bd7ed814f036bfe7f96b87415b6f462ca73c4737 Mon Sep 17 00:00:00 2001 From: yangfan Date: Wed, 10 Apr 2024 14:20:57 +0800 Subject: [PATCH 13/19] =?UTF-8?q?=E5=86=85=E5=AE=B9=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/include/image/image_common.h | 2 +- .../image_framework/include/image/image_source_native.h | 2 +- multimedia/image_framework/include/image/pixelmap_native.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 6dbf79160..99fcd715e 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -121,7 +121,7 @@ typedef enum { /** unsupported mime type */ IMAGE_UNSUPPORTED_MIMETYPE = 7600101, /** unknown mime type */ - IMAGE_UNKNOWN_MIMETYPE = 7600102, + IMAGE_UNKNOWN_MIME_TYPE = 7600102, /** too large data or image */ IMAGE_TOO_LARGE = 7600103, /** unsupported operations */ diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 14b49ef91..378674605 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -340,7 +340,7 @@ Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile(RawFileDescriptor *rawFil * @since 12 */ Image_ErrorCode OH_ImageSourceNative_CreatePixelmap(OH_ImageSourceNative *source, OH_DecodingOptions *options, - OH_PixelmapNative **pixepmap); + OH_PixelmapNative **pixelmap); /** * @brief Decodes an void pointer diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 27aa29877..fa193ffb1 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -66,11 +66,11 @@ typedef enum { /* * Premultiplied format */ - PIXELMAP_ALPHA_TYPE_PREMUL = 2, + PIXELMAP_ALPHA_TYPE_PREMULIPLIED = 2, /* * Unpremultiplied format */ - PIXELMAP_ALPHA_TYPE_UNPEMUL = 3, + PIXELMAP_ALPHA_TYPE_UNPREMULIPLIED = 3, }PIXELMAP_ALPHA_TYPE; typedef enum { -- Gitee From 2cc15e892467a2f799858b3dcddbcf7076900e18 Mon Sep 17 00:00:00 2001 From: yangfan Date: Wed, 10 Apr 2024 14:24:38 +0800 Subject: [PATCH 14/19] =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=90=97=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/include/image/image_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 99fcd715e..886153495 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -119,7 +119,7 @@ typedef enum { /** invalid parameter */ IMAGE_BAD_PARAMETER = 401, /** unsupported mime type */ - IMAGE_UNSUPPORTED_MIMETYPE = 7600101, + IMAGE_UNSUPPORTED_MIME_TYPE = 7600101, /** unknown mime type */ IMAGE_UNKNOWN_MIME_TYPE = 7600102, /** too large data or image */ -- Gitee From ca637af27f948e95e5ae547d25d20e30b3d063ce Mon Sep 17 00:00:00 2001 From: yangfan Date: Thu, 11 Apr 2024 12:59:26 +0800 Subject: [PATCH 15/19] =?UTF-8?q?gn=E6=A0=BC=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/BUILD.gn | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/multimedia/image_framework/BUILD.gn b/multimedia/image_framework/BUILD.gn index 567b54c88..cdf938414 100644 --- a/multimedia/image_framework/BUILD.gn +++ b/multimedia/image_framework/BUILD.gn @@ -42,8 +42,8 @@ ohos_ndk_library("libpixelmap") { ohos_ndk_headers("libpixelmap_header") { dest_dir = "$ndk_headers_out_dir/multimedia/image_framework" sources = [ - "./include/image/pixelmap_native.h", "./include/image/image_common.h", + "./include/image/pixelmap_native.h", ] } @@ -90,15 +90,14 @@ ohos_ndk_library("libimage_source") { min_compact_version = "12" system_capability = "SystemCapability.Multimedia.Image.ImageSource" system_capability_headers = [ - "multimedia/image_framework/image_source_native.h", - "multimedia/image_framework/image_common.h", + "multimedia/image_framework/image_source_native.h", + "multimedia/image_framework/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", - ] + sources = [ "./include/image/image_source_native.h" ] } ohos_ndk_library("libimage_packer_ndk") { @@ -118,13 +117,12 @@ ohos_ndk_library("libimage_packer") { min_compact_version = "12" system_capability = "SystemCapability.Multimedia.Image.ImagePacker" system_capability_headers = [ - "multimedia/image_framework/image_packer_native.h", - "multimedia/image_framework/image_common.h", + "multimedia/image_framework/image_packer_native.h", + "multimedia/image_framework/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", - ] + sources = [ "./include/image/image_packer_native.h" ] } -- Gitee From e9e4ba8fbc757af8665708d7e6c8e9f711a99332 Mon Sep 17 00:00:00 2001 From: yangfan Date: Thu, 11 Apr 2024 16:08:08 +0800 Subject: [PATCH 16/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/include/image/pixelmap_native.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index fa193ffb1..871e0c6b0 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -66,11 +66,11 @@ typedef enum { /* * Premultiplied format */ - PIXELMAP_ALPHA_TYPE_PREMULIPLIED = 2, + PIXELMAP_ALPHA_TYPE_PREMULTIPLIED = 2, /* * Unpremultiplied format */ - PIXELMAP_ALPHA_TYPE_UNPREMULIPLIED = 3, + PIXELMAP_ALPHA_TYPE_UNPREMULTIPLIED = 3, }PIXELMAP_ALPHA_TYPE; typedef enum { -- Gitee From d3d3df277c08e1eb69167790fddcfea6d5488a44 Mon Sep 17 00:00:00 2001 From: yangfan Date: Thu, 11 Apr 2024 16:18:40 +0800 Subject: [PATCH 17/19] =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/include/image/pixelmap_native.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 871e0c6b0..e9793dc56 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -67,10 +67,6 @@ typedef enum { * Premultiplied format */ PIXELMAP_ALPHA_TYPE_PREMULTIPLIED = 2, - /* - * Unpremultiplied format - */ - PIXELMAP_ALPHA_TYPE_UNPREMULTIPLIED = 3, }PIXELMAP_ALPHA_TYPE; typedef enum { -- Gitee From c964b14d6cea8696ef5c794decdcde1c54fddd33 Mon Sep 17 00:00:00 2001 From: yangfan Date: Thu, 11 Apr 2024 16:25:44 +0800 Subject: [PATCH 18/19] update Signed-off-by: yangfan --- .../include/image/image_packer_native.h | 36 ------------ .../include/image/image_source_native.h | 55 ------------------- .../include/image/pixelmap_native.h | 10 ---- .../image_framework/libimage_packer.ndk.json | 8 --- .../image_framework/libimage_source.ndk.json | 12 ---- .../image_framework/libpixelmap.ndk.json | 4 -- 6 files changed, 125 deletions(-) diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h index dfe560dcf..32ffdff8d 100644 --- a/multimedia/image_framework/include/image/image_packer_native.h +++ b/multimedia/image_framework/include/image/image_packer_native.h @@ -58,22 +58,6 @@ typedef struct OH_ImagePackerNative OH_ImagePackerNative; 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. * @@ -128,26 +112,6 @@ Image_ErrorCode OH_PackingOptions_GetQuality(OH_PackingOptions *options, Image_ErrorCode OH_PackingOptions_SetQuality(OH_PackingOptions *options, uint32_t quality); -/** - * @brief Get desiredDynamicRange for PackingOptions struct. - * - * @param options The PackingOptions pointer will be operated. - * @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}. - * @return Returns {@link Image_ErrorCode} - * @since 12 - */ -Image_ErrorCode OH_PackingOptions_GetDesiredDynamicRange(OH_PackingOptions *options, int32_t* desiredDynamicRange); - -/** - * @brief Set desiredDynamicRange number for PackingOptions struct. - * - * @param options The PackingOptions pointer will be operated. - * @param desiredDynamicRange The number of dynamic range {@link IMAGE_PACKER_DYNAMIC_RANGE}. - * @return Returns {@link Image_ErrorCode} - * @since 12 - */ -Image_ErrorCode OH_PackingOptions_SetDesiredDynamicRange(OH_PackingOptions *options, int32_t desiredDynamicRange); - /** * @brief delete OH_PackingOptions pointer. * diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 378674605..991def47f 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -60,28 +60,6 @@ typedef struct OH_ImageSourceNative OH_ImageSourceNative; 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. * @@ -111,17 +89,6 @@ Image_ErrorCode OH_ImageSourceInfo_GetWidth(OH_ImageSource_Info *info, uint32_t */ Image_ErrorCode OH_ImageSourceInfo_GetHeight(OH_ImageSource_Info *info, uint32_t *height); - -/** - * @brief Get isHdr for OH_ImageSource_Info struct. - * - * @param info The 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. * @@ -255,28 +222,6 @@ Image_ErrorCode OH_DecodingOptions_GetDesiredRegion(OH_DecodingOptions *options, Image_ErrorCode OH_DecodingOptions_SetDesiredRegion(OH_DecodingOptions *options, Image_Region *desiredRegion); -/** - * @brief Set desiredDynamicRange number for OH_DecodingOptions struct. - * - * @param options The OH_DecodingOptions pointer will be operated. - * @param desiredDynamicRange the number of desired dynamic range {@link IMAGE_DYNAMIC_RANGE}. - * @return Returns {@link Image_ErrorCode} - * @since 12 - */ -Image_ErrorCode OH_DecodingOptions_GetDesiredDynamicRange(OH_DecodingOptions *options, - int32_t *desiredDynamicRange); - -/** - * @brief Set desiredDynamicRange number for OH_DecodingOptions struct. - * - * @param options The OH_DecodingOptions pointer will be operated. - * @param desiredDynamicRange the number of desired dynamic range {@link IMAGE_DYNAMIC_RANGE}. - * @return Returns {@link Image_ErrorCode} - * @since 12 - */ -Image_ErrorCode OH_DecodingOptions_SetDesiredDynamicRange(OH_DecodingOptions *options, - int32_t desiredDynamicRange); - /** * @brief delete OH_DecodingOptions pointer. * diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index e9793dc56..5f176d821 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -289,16 +289,6 @@ Image_ErrorCode OH_PixelmapImageInfo_GetPixelFormat(OH_Pixelmap_ImageInfo *info, */ Image_ErrorCode OH_PixelmapImageInfo_GetAlphaType(OH_Pixelmap_ImageInfo *info, int32_t *alphaType); -/** - * @brief Get isHdr boolean for imageinfo struct. - * - * @param info The imageinfo pointer will be operated. - * @param isHdr Whether the image has a high dynamic range. - * @return Returns {@link Image_ErrorCode} - * @since 12 - */ -Image_ErrorCode OH_PixelmapImageInfo_GetDynamicRange(OH_Pixelmap_ImageInfo *info, bool *isHdr); - /** * @brief Delete imageinfo struct pointer. * diff --git a/multimedia/image_framework/libimage_packer.ndk.json b/multimedia/image_framework/libimage_packer.ndk.json index c5b00c4ce..33def951b 100644 --- a/multimedia/image_framework/libimage_packer.ndk.json +++ b/multimedia/image_framework/libimage_packer.ndk.json @@ -19,14 +19,6 @@ "first_introduced": "12", "name": "OH_PackingOptions_SetQuality" }, - { - "first_introduced": "12", - "name": "OH_PackingOptions_GetDesiredDynamicRange" - }, - { - "first_introduced": "12", - "name": "OH_PackingOptions_SetDesiredDynamicRange" - }, { "first_introduced": "12", "name": "OH_PackingOptions_Release" diff --git a/multimedia/image_framework/libimage_source.ndk.json b/multimedia/image_framework/libimage_source.ndk.json index 562ec53ca..0c91a11dc 100644 --- a/multimedia/image_framework/libimage_source.ndk.json +++ b/multimedia/image_framework/libimage_source.ndk.json @@ -11,10 +11,6 @@ "first_introduced": "12", "name": "OH_ImageSourceInfo_GetHeight" }, - { - "first_introduced": "12", - "name": "OH_ImageSourceInfo_GetDynamicRange" - }, { "first_introduced": "12", "name": "OH_ImageSourceInfo_Release" @@ -63,14 +59,6 @@ "first_introduced": "12", "name": "OH_DecodingOptions_SetDesiredRegion" }, - { - "first_introduced": "12", - "name": "OH_DecodingOptions_GetDesiredDynamicRange" - }, - { - "first_introduced": "12", - "name": "OH_DecodingOptions_SetDesiredDynamicRange" - }, { "first_introduced": "12", "name": "OH_DecodingOptions_Release" diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index c10325713..c1c138185 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -63,10 +63,6 @@ "first_introduced": "12", "name": "OH_PixelmapImageInfo_GetAlphaType" }, - { - "first_introduced": "12", - "name": "OH_PixelmapImageInfo_GetDynamicRange" - }, { "first_introduced": "12", "name": "OH_PixelmapImageInfo_Release" -- Gitee From cb04466dbf00aa4784a474082b853879461ac3b1 Mon Sep 17 00:00:00 2001 From: yangfan Date: Thu, 11 Apr 2024 16:44:55 +0800 Subject: [PATCH 19/19] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfan --- multimedia/image_framework/include/image/image_common.h | 2 +- multimedia/image_framework/include/image/image_source_native.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 886153495..a567e4615 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -1158,7 +1158,7 @@ static const char *OHOS_IMAGE_PROPERTY_GPS_H_POSITIONING_ERROR = "GPSHPositionin /** * @brief This tag indicates the sensitivity of the camera or input device when the image was shot. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. - * + * * @since 12 */ static const char *OHOS_IMAGE_PROPERTY_PHOTOGRAPHIC_SENSITIVITY = "PhotographicSensitivity"; diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 991def47f..c172388ee 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -270,7 +270,7 @@ Image_ErrorCode OH_ImageSourceNative_CreateFromData(uint8_t *data, size_t dataSi * @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); /** -- Gitee