Use set colorspace 40/238340/1
authorhj kim <backto.kim@samsung.com>
Mon, 13 Jul 2020 02:52:50 +0000 (11:52 +0900)
committerhj kim <backto.kim@samsung.com>
Mon, 13 Jul 2020 02:52:50 +0000 (11:52 +0900)
Change-Id: Iabca5d5de4ab664a3dfafba88499689aca7212e2

src/image_util_decode.c

index 760e5d1..a48f708 100644 (file)
@@ -285,9 +285,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_image_from_file(_handle->path, MM_UTIL_COLOR_RGBA, image_info);
+                               err = mm_util_decode_image_from_file(_handle->path, _handle->colorspace, image_info);
                        else
-                               err = mm_util_decode_image_from_buffer(_handle->src_buffer, _handle->src_size, MM_UTIL_COLOR_RGBA, image_info);
+                               err = mm_util_decode_image_from_buffer(_handle->src_buffer, _handle->src_size, _handle->colorspace, image_info);
                }
                break;
        default:
@@ -376,7 +376,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_image_from_file(file_path, MM_UTIL_COLOR_RGBA, image);
+               ret = mm_util_decode_image_from_file(file_path, _handle->colorspace, image);
                break;
 
        default:
@@ -424,7 +424,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_image_from_buffer((void *)buffer, buffer_size, MM_UTIL_COLOR_RGBA, image);
+               ret = mm_util_decode_image_from_buffer((void *)buffer, buffer_size, _handle->colorspace, image);
                break;
        default:
                image_util_error("Not supported format [%d]", image_type);