From cbe330bafcddb82134a357ff136d879f738fc721 Mon Sep 17 00:00:00 2001 From: hj kim Date: Wed, 21 Feb 2018 05:52:09 +0000 Subject: [PATCH] Revert "Apply new mm_util_resize_image()" This reverts commit 551b1559b1f25e174df0c97d9271e6ba153933ed. Change-Id: I22f8e00d7ea2779dbfc3cee68ceeaf23a5136c54 --- src/image_util_internal.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/image_util_internal.c b/src/image_util_internal.c index 6231f0b..0591bad 100755 --- a/src/image_util_internal.c +++ b/src/image_util_internal.c @@ -38,10 +38,6 @@ int image_util_convert_colorspace(unsigned char *dest, image_util_colorspace_e d int image_util_resize(unsigned char *dest, int *dest_width, int *dest_height, const unsigned char *src, int src_width, int src_height, image_util_colorspace_e colorspace) { int err = MM_UTIL_ERROR_NONE; - unsigned int res_w = 0; - unsigned int res_h = 0; - unsigned char *res_buffer = NULL; - size_t res_buffer_size = 0; image_util_retvm_if((dest == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "dest is null"); image_util_retvm_if((src == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "src is null"); @@ -49,11 +45,13 @@ int image_util_resize(unsigned char *dest, int *dest_width, int *dest_height, co image_util_retvm_if((dest_width == NULL || dest_height == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "dest_width or dest_height is null"); image_util_retvm_if((*dest_width <= 0 || *dest_height <= 0), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid dest_width or Invalid dest_height"); - err = mm_util_resize_image(src, src_width, src_height, TYPECAST_COLOR(colorspace), *dest_width, dest_height, &res_buffer, &res_w, &res_h, &res_buffer_size); + unsigned int dest_w, dest_h; + dest_w = *dest_width; + dest_h = *dest_height; + err = mm_util_resize_image(src, src_width, src_height, TYPECAST_COLOR(colorspace), dest, &dest_w, &dest_h); if (err == MM_UTIL_ERROR_NONE) { - memcpy(dest, res_buffer, res_buffer_size); - *dest_width = (int)res_w; - *dest_height = (int)res_h; + *dest_width = (int)dest_w; + *dest_height = (int)dest_h; } return _image_error_capi(ERR_TYPE_TRANSFORM, err); -- 2.7.4