From 596d06b7c048c8c9be3a82e9a4692b9ac7a64279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=B9=94=E5=BC=82?= Date: Wed, 4 Dec 2024 19:44:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96=20Pixe?= =?UTF-8?q?lmap=20=E5=A4=A7=E5=B0=8F=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈乔异 --- .../include/image/pixelmap_native.h | 26 +++++++++++++++++++ .../image_framework/libpixelmap.ndk.json | 8 ++++++ 2 files changed, 34 insertions(+) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index c7ea3eb57..b0d3c492e 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -901,6 +901,32 @@ Image_ErrorCode OH_PixelmapNative_SetColorSpaceNative(OH_PixelmapNative *pixelma */ Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, char *name, size_t *size); +/** + * @brief Get the total number of bytes occupied by all pixels in the Pixelmap, without any padding. + * + * @param pixelmap The Pixelmap pointer to be operated. + * @param byteCount The total number of bytes to be retrieved. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the operation is successful. + * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid. + * @see OH_PixelmapNative + * @since 13 + */ +Image_ErrorCode OH_PixelmapNative_GetByteCount(OH_PixelmapNative *pixelmap, uint32_t *byteCount); + +/** + * @brief Get the capacity of the Pixelmap, which is the number of bytes allocated by the Pixelmap. + * + * @param pixelmap The Pixelmap pointer to be operated. + * @param capacity The capacity to be retrieved. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the operation is successful. + * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid. + * @see OH_PixelmapNative + * @since 13 + */ +Image_ErrorCode OH_PixelmapNative_GetCapacity(OH_PixelmapNative *pixelmap, uint32_t *capacity); + #ifdef __cplusplus }; #endif diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 4c103c8ae..57dcc2ae1 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -182,5 +182,13 @@ { "first_introduced": "13", "name": "OH_PixelmapNative_SetMemoryName" + }, + { + "first_introduced": "13", + "name": "OH_PixelmapNative_GetByteCount" + }, + { + "first_introduced": "13", + "name": "OH_PixelmapNative_GetCapacity" } ] \ No newline at end of file -- Gitee From a3376d279edb9feeed79b619a4e4e98ce3e6b5c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=B9=94=E5=BC=82?= Date: Wed, 4 Dec 2024 20:04:41 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20API=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈乔异 --- multimedia/image_framework/include/image/pixelmap_native.h | 4 ++-- multimedia/image_framework/libpixelmap.ndk.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index b0d3c492e..8006cb653 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -910,7 +910,7 @@ Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, cha * {@link IMAGE_SUCCESS} If the operation is successful. * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid. * @see OH_PixelmapNative - * @since 13 + * @since 15 */ Image_ErrorCode OH_PixelmapNative_GetByteCount(OH_PixelmapNative *pixelmap, uint32_t *byteCount); @@ -923,7 +923,7 @@ Image_ErrorCode OH_PixelmapNative_GetByteCount(OH_PixelmapNative *pixelmap, uint * {@link IMAGE_SUCCESS} If the operation is successful. * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid. * @see OH_PixelmapNative - * @since 13 + * @since 15 */ Image_ErrorCode OH_PixelmapNative_GetCapacity(OH_PixelmapNative *pixelmap, uint32_t *capacity); diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 57dcc2ae1..05c7a91ce 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -184,11 +184,11 @@ "name": "OH_PixelmapNative_SetMemoryName" }, { - "first_introduced": "13", + "first_introduced": "15", "name": "OH_PixelmapNative_GetByteCount" }, { - "first_introduced": "13", + "first_introduced": "15", "name": "OH_PixelmapNative_GetCapacity" } ] \ No newline at end of file -- Gitee From 3d4ebbc8f202e812e0b5c513f1df375db525b514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=B9=94=E5=BC=82?= Date: Wed, 4 Dec 2024 20:10:56 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20API=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈乔异 --- multimedia/image_framework/include/image/pixelmap_native.h | 4 ++-- multimedia/image_framework/libpixelmap.ndk.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 8006cb653..719a29517 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -910,7 +910,7 @@ Image_ErrorCode OH_PixelmapNative_SetMemoryName(OH_PixelmapNative *pixelmap, cha * {@link IMAGE_SUCCESS} If the operation is successful. * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid. * @see OH_PixelmapNative - * @since 15 + * @since 16 */ Image_ErrorCode OH_PixelmapNative_GetByteCount(OH_PixelmapNative *pixelmap, uint32_t *byteCount); @@ -923,7 +923,7 @@ Image_ErrorCode OH_PixelmapNative_GetByteCount(OH_PixelmapNative *pixelmap, uint * {@link IMAGE_SUCCESS} If the operation is successful. * {@link IMAGE_BAD_PARAMETER} If invalid parameter, pixelmap or byteCount are invalid. * @see OH_PixelmapNative - * @since 15 + * @since 16 */ Image_ErrorCode OH_PixelmapNative_GetCapacity(OH_PixelmapNative *pixelmap, uint32_t *capacity); diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 05c7a91ce..df5893bb5 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -184,11 +184,11 @@ "name": "OH_PixelmapNative_SetMemoryName" }, { - "first_introduced": "15", + "first_introduced": "16", "name": "OH_PixelmapNative_GetByteCount" }, { - "first_introduced": "15", + "first_introduced": "16", "name": "OH_PixelmapNative_GetCapacity" } ] \ No newline at end of file -- Gitee