Use mmutil-magick instead of mmutil-bmp 17/231817/4 accepted/tizen/unified/20200601.051555 submit/tizen/20200529.005835
authorhj kim <backto.kim@samsung.com>
Fri, 24 Apr 2020 09:02:31 +0000 (18:02 +0900)
committerhj kim <backto.kim@samsung.com>
Thu, 28 May 2020 09:01:12 +0000 (18:01 +0900)
mmutil-bmp was just a wrapper of mmutil-magick. so use mmutil-magick directlry.

Change-Id: I7fdbeba2eff597a29d486c1a005855b5ef82cfc0

CMakeLists.txt
packaging/capi-media-image-util.spec
src/image_util_decode.c
src/image_util_encode.c
src/image_util_private.c

index da1a21d..fcd95bb 100755 (executable)
@@ -9,7 +9,7 @@ SET(INC_DIR include)
 INCLUDE_DIRECTORIES(${INC_DIR})
 
 # for package file
-SET(dependents "dlog mmutil-bmp mmutil-common mmutil-gif mmutil-png mmutil-jpeg mmutil-imgp capi-base-common capi-media-tool glib-2.0")
+SET(dependents "dlog mmutil-magick mmutil-common mmutil-gif mmutil-png mmutil-jpeg mmutil-imgp capi-base-common capi-media-tool glib-2.0")
 SET(pc_dependents "capi-base-common capi-media-tool")
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${fw_name} REQUIRED ${dependents})
index 9b8bd94..ad91564 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-image-util
 Summary:    A Image Utility library in Tizen Native API
-Version:    0.2.4
+Version:    0.2.5
 Release:    2
 Group:      Multimedia/API
 License:    Apache-2.0
@@ -12,7 +12,7 @@ BuildRequires:  pkgconfig(mmutil-jpeg)
 BuildRequires:  pkgconfig(mmutil-imgp)
 BuildRequires:  pkgconfig(mmutil-png)
 BuildRequires:  pkgconfig(mmutil-gif)
-BuildRequires:  pkgconfig(mmutil-bmp)
+BuildRequires:  pkgconfig(mmutil-magick)
 BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires:  pkgconfig(capi-media-tool)
 BuildRequires:  pkgconfig(glib-2.0)
index a70d791..6df1f2d 100644 (file)
@@ -20,7 +20,7 @@
 #include <mm_util_jpeg.h>
 #include <mm_util_png.h>
 #include <mm_util_gif.h>
-#include <mm_util_bmp.h>
+#include <mm_util_magick.h>
 #include <mm_util_image.h>
 
 #include <image_util.h>
@@ -278,9 +278,9 @@ static int __image_util_decode_internal(decode_s *_handle, mm_util_image_h *imag
        case IMAGE_UTIL_BMP:
                {
                        if (_handle->path)
-                               err = mm_util_decode_from_bmp_file(_handle->path, image_info);
+                               err = mm_util_decode_image_from_file(_handle->path, MM_UTIL_COLOR_RGBA, image_info);
                        else
-                               err = mm_util_decode_from_bmp_memory(_handle->src_buffer, _handle->src_size, image_info);
+                               err = mm_util_decode_image_from_buffer(_handle->src_buffer, _handle->src_size, MM_UTIL_COLOR_RGBA, image_info);
                }
                break;
        default:
@@ -368,7 +368,7 @@ static int __image_util_decode_run_from_file(image_util_decode_h handle, const c
                break;
 
        case IMAGE_UTIL_BMP:
-               ret = mm_util_decode_from_bmp_file(file_path, image);
+               ret = mm_util_decode_image_from_file(file_path, MM_UTIL_COLOR_RGBA, image);
                break;
 
        default:
@@ -416,7 +416,7 @@ static int __image_util_decode_run_from_buffer(image_util_decode_h handle, const
                ret = mm_util_decode_from_gif_memory((void *)buffer, buffer_size, image);
                break;
        case IMAGE_UTIL_BMP:
-               ret = mm_util_decode_from_bmp_memory((void *)buffer, buffer_size, image);
+               ret = mm_util_decode_image_from_buffer((void *)buffer, buffer_size, MM_UTIL_COLOR_RGBA, image);
                break;
        default:
                image_util_error("Not supported format [%d]", image_type);
index fb6db79..a78eb4e 100644 (file)
@@ -18,7 +18,7 @@
 #include <mm_util_jpeg.h>
 #include <mm_util_png.h>
 #include <mm_util_gif.h>
-#include <mm_util_bmp.h>
+#include <mm_util_magick.h>
 #include <mm_util_image.h>
 
 #include <image_util.h>
@@ -335,9 +335,9 @@ static int __image_util_encode_internal(encode_s * _handle)
        case IMAGE_UTIL_BMP:
                {
                        if (_handle->path)
-                               err = mm_util_encode_bmp_to_file(_src, _handle->path);
+                               err = mm_util_encode_image_to_file(_src, _handle->path);
                        else
-                               err = mm_util_encode_bmp_to_memory(_src, _handle->dst_buffer, &_handle->dst_size);
+                               err = mm_util_encode_image_to_buffer(_src, IMG_CODEC_BMP, _handle->dst_buffer, &_handle->dst_size);
                }
                break;
        default:
@@ -381,7 +381,7 @@ static int __image_util_encode_run_to_file(image_util_encode_h handle, image_uti
                break;
 
        case IMAGE_UTIL_BMP:
-               ret = mm_util_encode_bmp_to_file(image, file_path);
+               ret = mm_util_encode_image_to_file(image, file_path);
                break;
 
        default:
@@ -420,7 +420,7 @@ static int __image_util_encode_run_to_buffer(image_util_encode_h handle, image_u
                break;
 
        case IMAGE_UTIL_BMP:
-               ret = mm_util_encode_bmp_to_memory(image, (void **)buffer, buffer_size);
+               ret = mm_util_encode_image_to_buffer(image, IMG_CODEC_BMP, (void **)buffer, buffer_size);
                break;
        default:
                return IMAGE_UTIL_ERROR_INVALID_PARAMETER;
index 9435e0c..f66ff19 100755 (executable)
@@ -24,7 +24,6 @@
 #include <mm_util_jpeg.h>
 #include <mm_util_png.h>
 #include <mm_util_gif.h>
-#include <mm_util_bmp.h>
 
 typedef struct {
        mm_util_color_format_e image_format;