diff --git a/multimedia/image_framework/include/image_pixel_map_mdk.h b/multimedia/image_framework/include/image_pixel_map_mdk.h index cd511ca30a8a73080a93f7c7c150b5a578679b9b..f4a432d7a0ef7f293ddbdfc2b965122834a7aaa6 100644 --- a/multimedia/image_framework/include/image_pixel_map_mdk.h +++ b/multimedia/image_framework/include/image_pixel_map_mdk.h @@ -607,6 +607,20 @@ int32_t OH_PixelMap_AccessPixels(const NativePixelMap* native, void** addr); */ int32_t OH_PixelMap_UnAccessPixels(const NativePixelMap* native); + +/** + * @brief Get color space of a PixelMap. + * + * @param native Indicates the pointer to an {@link ImagePacker} object at the native layer. + * @param colorSpace Indicates the pointer to the JS color space object. + * @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful. + * returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter. + * returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if colorspace unsupport. + * @since 11 + * @version 4.1 + */ +int32_t OH_PixelMap_GetColorSpace(const NativePixelMap* native, napi_value* colorSpace); + #ifdef __cplusplus }; #endif diff --git a/multimedia/image_framework/libimage_pixelmap_napi.ndk.json b/multimedia/image_framework/libimage_pixelmap_napi.ndk.json index 64800fe826282f2c62c68ee354f432af18ea4fed..c535a01659f98f2748b2741afd5f9ad6474d3268 100644 --- a/multimedia/image_framework/libimage_pixelmap_napi.ndk.json +++ b/multimedia/image_framework/libimage_pixelmap_napi.ndk.json @@ -62,5 +62,9 @@ }, { "name": "OH_PixelMap_UnAccessPixels" + }, + { + "first_introduced": "11", + "name": "OH_PixelMap_GetColorSpace" } ] \ No newline at end of file