goto ERROR;
}
- ret = mm_util_create_handle(&img, frame, width, height, size, MM_UTIL_COLOR_RGB24);
+ ret = mm_image_create_image(width, height, MM_UTIL_COLOR_RGB24, frame, size, &img);
if (ret != MM_UTIL_ERROR_NONE) {
- thumbnail_util_error("Failed to mm_util_create_handle");
+ thumbnail_util_error("Failed to mm_image_create_image");
goto ERROR;
}
if (thumb->extract_type == THUMBNAIL_UTIL_FILE) {
ret = mm_util_resize_B_P(img, thumb_width, thumb_height, thumb->thumbnail_path);
- mm_util_destroy_handle(img);
+ mm_image_destroy_image(img);
if (ret != MM_UTIL_ERROR_NONE)
goto ERROR;
} else {
mm_util_color_format_e res_format = MM_UTIL_COLOR_NUM;
ret = mm_util_resize_B_B(img, thumb_width, thumb_height, &res_img);
- mm_util_destroy_handle(img);
+ mm_image_destroy_image(img);
if (ret != MM_UTIL_ERROR_NONE)
goto ERROR;
- ret = mm_util_get_image(res_img, &res_buf, &res_width, &res_height, &res_buf_size, &res_format);
- mm_util_destroy_handle(res_img);
+ ret = mm_image_get_image(res_img, &res_width, &res_height, &res_format, &res_buf, &res_buf_size);
+ mm_image_destroy_image(res_img);
if (ret != MM_UTIL_ERROR_NONE)
goto ERROR;
ret = mm_util_resize_P_B(thumb->path, thumb_width, thumb_height, MM_UTIL_COLOR_BGRA, &res_img);
thumbnail_util_retv_if(ret != MM_UTIL_ERROR_NONE, THUMBNAIL_UTIL_ERROR_INVALID_OPERATION);
- ret = mm_util_get_image(res_img, &buf, &width, &height, &buf_size, &format);
- mm_util_destroy_handle(res_img);
+ ret = mm_image_get_image(res_img, &width, &height, &format, &buf, &buf_size);
+ mm_image_destroy_image(res_img);
thumbnail_util_retv_if(ret != MM_UTIL_ERROR_NONE, THUMBNAIL_UTIL_ERROR_INVALID_OPERATION);
thumb->buffer = malloc(buf_size * sizeof(unsigned char));