Bug fix. modify using wrong value of 'mm_util_resize_and_rotate_P_P' 62/280762/3
authorjiyong.min <jiyong.min@samsung.com>
Mon, 5 Sep 2022 01:33:03 +0000 (10:33 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Mon, 5 Sep 2022 05:11:59 +0000 (14:11 +0900)
 - This is the side-effect of 'Change-Id: Ia184d5b651cabebd1b3f2d5f55cde8f92817bee0'.

Change-Id: Ibbd90e9d27bd15dee55675c6b0350f53917df949

magick/mm_util_magick.c
packaging/libmm-utility.spec

index bfbe926..42edba7 100644 (file)
@@ -987,6 +987,8 @@ int mm_util_resize_and_rotate_P_P(const char *src_path, unsigned int req_width,
        }
 
        ret = __mm_util_resize_image(_image, req_width, req_height, &_resized_image);
+       DestroyImageList(_image);
+       _image = NULL;
        if (ret != MM_UTIL_ERROR_NONE) {
                mm_util_error("Error: __mm_util_resize_image failed.");
                goto END;
@@ -1014,7 +1016,7 @@ int mm_util_resize_and_rotate_P_P(const char *src_path, unsigned int req_width,
        }
 
        if (rotation != MM_UTIL_ROTATE_0) {
-               ret = __mm_util_rotate_image(_image, rotation, &_rotated_image);
+               ret = __mm_util_rotate_image(_resized_image, rotation, &_rotated_image);
                if (ret != MM_UTIL_ERROR_NONE) {
                        mm_util_error("Error: __mm_util_rotate_image failed.");
                        goto END;
@@ -1036,7 +1038,6 @@ int mm_util_resize_and_rotate_P_P(const char *src_path, unsigned int req_width,
 
 END:
 
-       DestroyImageList(_image);
        __mm_util_finalize(_resized_image, _rotated_image, &exception);
 
        mm_util_fleave();
index 470a6bf..8f4c4a0 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-utility
 Summary:    Multimedia Framework Utility Library
-Version:    0.4.5
+Version:    0.4.6
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0