[ACR-1583] Extending Support Scope for PNG 43/238743/8 accepted/tizen/unified/20200723.161304 submit/tizen/20200722.020114
authorhj kim <backto.kim@samsung.com>
Fri, 17 Jul 2020 03:46:58 +0000 (12:46 +0900)
committerhj kim <backto.kim@samsung.com>
Wed, 22 Jul 2020 07:30:07 +0000 (16:30 +0900)
before using GraphicsMagick, IMAGE_UTIL_COLORSPACE_RGBA8888 was the only supported colorspace for PNG encoding/decoding.
because libpng can handle only this colorspace. but GraphicsMagick can cover other formats.
so, since 6.0 image-util supports more colorspaces for PNG.

Change-Id: I525493f8683be71f515c51881ce38b4bab8a556b

include/image_util_encode.h
packaging/capi-media-image-util.spec
src/image_util_private.c

index 0df691d..8fe24da 100644 (file)
@@ -422,10 +422,12 @@ int image_util_encode_run_async(image_util_encode_h handle, image_util_encode_co
 * @since_tizen 5.5
 *
 * @remarks If any functions at the pre-condition are not called first, #IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned.\n
-*          The only supported colorspace for BMP, GIF and PNG is #IMAGE_UTIL_COLORSPACE_RGBA8888.\n
+*          The only supported colorspace for BMP and GIF is #IMAGE_UTIL_COLORSPACE_RGBA8888.\n
 *          To get supported colorspaces for JPEG format, you can use image_util_foreach_supported_colorspace().\n
 *          http://tizen.org/privilege/mediastorage is required if @a file_path value is media storage.\n
-*          http://tizen.org/privilege/externalstorage is required if @a file_path value is external storage.
+*          http://tizen.org/privilege/externalstorage is required if @a file_path value is external storage.\n
+*          Before 6.0, IMAGE_UTIL_COLORSPACE_RGBA8888 was the only supported colorspace for PNG. But since 6.0, this module supports more colorspaces for PNG.
+*          To get supported colorspaces for PNG, you can use image_util_foreach_supported_colorspace().\n
 *
 * @param[in] handle The handle of image util encoding
 * @param[in] image The image handle for encoding
@@ -457,8 +459,10 @@ int image_util_encode_run_to_file(image_util_encode_h handle, image_util_image_h
 *
 * @remarks If any functions at the pre-condition are not called first, #IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned.\n
 *          The @a buffer should be released using free().\n
-*          The only supported colorspace for BMP, GIF and PNG is #IMAGE_UTIL_COLORSPACE_RGBA8888.\n
-*          To get supported colorspaces for JPEG format, you can use image_util_foreach_supported_colorspace().
+*          The only supported colorspace for BMP and GIF is #IMAGE_UTIL_COLORSPACE_RGBA8888.\n
+*          To get supported colorspaces for JPEG format, you can use image_util_foreach_supported_colorspace().\n
+*          Before 6.0, IMAGE_UTIL_COLORSPACE_RGBA8888 was the only supported colorspace for PNG. But since 6.0, this module supports more colorspaces for PNG.
+*          To get supported colorspaces for PNG, you can use image_util_foreach_supported_colorspace().\n
 *
 * @param[in] handle The handle of image util encoding
 * @param[in] image The image handle for encoding
@@ -489,10 +493,12 @@ int image_util_encode_run_to_buffer(image_util_encode_h handle, image_util_image
 * @since_tizen 5.5
 *
 * @remarks If any functions at the pre-condition are not called first, #IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned.\n
-*          The only supported colorspace for BMP, GIF and PNG is #IMAGE_UTIL_COLORSPACE_RGBA8888.\n
+*          The only supported colorspace for BMP and GIF is #IMAGE_UTIL_COLORSPACE_RGBA8888.\n
 *          To get supported colorspaces for JPEG format, you can use image_util_foreach_supported_colorspace().\n
 *          http://tizen.org/privilege/mediastorage is required if @a file_path value is media storage.\n
-*          http://tizen.org/privilege/externalstorage is required if @a file_path value is external storage.
+*          http://tizen.org/privilege/externalstorage is required if @a file_path value is external storage.\n
+*          Before 6.0, IMAGE_UTIL_COLORSPACE_RGBA8888 was the only supported colorspace for PNG. But since 6.0, this module supports more colorspaces for PNG.
+*          To get supported colorspaces for PNG, you can use image_util_foreach_supported_colorspace().\n
 *
 * @param[in] handle The handle of image util encoding
 * @param[in] image The image handle for encoding
@@ -524,8 +530,10 @@ int image_util_encode_run_async_to_file(image_util_encode_h handle, image_util_i
 * @since_tizen 5.5
 *
 * @remarks If any functions at the pre-condition are not called first, #IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned.\n
-*          The only supported colorspace for BMP, GIF and PNG is #IMAGE_UTIL_COLORSPACE_RGBA8888.\n
-*          To get supported colorspaces for JPEG format, you can use image_util_foreach_supported_colorspace().
+*          The only supported colorspace for BMP and GIF is #IMAGE_UTIL_COLORSPACE_RGBA8888.\n
+*          To get supported colorspaces for JPEG format, you can use image_util_foreach_supported_colorspace().\n
+*          Before 6.0, IMAGE_UTIL_COLORSPACE_RGBA8888 was the only supported colorspace for PNG. But since 6.0, this module supports more colorspaces for PNG.
+*          To get supported colorspaces for PNG, you can use image_util_foreach_supported_colorspace().\n
 *
 * @param[in] handle The handle of image util encoding
 * @param[in] image The image handle for encoding
index 1f3beaf..de2440a 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-image-util
 Summary:    A Image Utility library in Tizen Native API
-Version:    0.2.8
+Version:    0.2.9
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index e652823..f89300d 100755 (executable)
@@ -89,8 +89,8 @@ static int _convert_png_colorspace_tbl[] = {
        _NOT_SUPPORTED_COLORSPACE,      /* IMAGE_UTIL_COLORSPACE_YUYV */
        _NOT_SUPPORTED_COLORSPACE,      /* IMAGE_UTIL_COLORSPACE_RGB565 */
        _NOT_SUPPORTED_COLORSPACE,      /* IMAGE_UTIL_COLORSPACE_RGB888 */
-       _NOT_SUPPORTED_COLORSPACE,      /* IMAGE_UTIL_COLORSPACE_ARGB8888 */
-       _NOT_SUPPORTED_COLORSPACE,      /* IMAGE_UTIL_COLORSPACE_BGRA8888 */
+       MM_UTIL_COLOR_ARGB,                     /* IMAGE_UTIL_COLORSPACE_ARGB8888 */
+       MM_UTIL_COLOR_BGRA,                     /* IMAGE_UTIL_COLORSPACE_BGRA8888 */
        MM_UTIL_COLOR_RGBA,                     /* IMAGE_UTIL_COLORSPACE_RGBA8888 */
        _NOT_SUPPORTED_COLORSPACE,      /* IMAGE_UTIL_COLORSPACE_BGRX8888 */
        _NOT_SUPPORTED_COLORSPACE,      /* IMAGE_UTIL_COLORSPACE_NV21 */