int convert_type_of_colorspace(const image_util_colorspace_e colorspace);
int convert_type_of_colorspace_with_image_type(const image_util_colorspace_e colorspace, const image_util_type_e type);
int _image_error_capi(int error_code);
-bool _image_util_check_resolution(int width, int height);
/**
* @}
image_util_retvm_if((_handle == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
image_util_retvm_if((_handle->set_crop), IMAGE_UTIL_ERROR_INVALID_OPERATION, "Crop and Resize can't do at the same time");
- image_util_retvm_if((_image_util_check_resolution(width, height) == false), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid resolution");
+ image_util_retvm_if((width == 0 || height == 0), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid resolution w : [%d] h : [%d]", width, height);
_handle->dst_width = width;
_handle->dst_height = height;
dest_height = end_y - start_y;
image_util_debug("Set crop_info x[%d] y[%d] w[%d] h[%d]", start_x, start_y, dest_width, dest_height);
-
- image_util_retvm_if((_image_util_check_resolution(dest_width, dest_height) == false), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid dest resolution");
+ image_util_retvm_if((dest_width <= 0 || dest_height <= 0), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid resolution w : [%d] h : [%d]", dest_width, dest_height);
_handle->start_x = start_x;
_handle->start_y = start_y;
encode_s *_handle = (encode_s *) handle;
image_util_retvm_if(_handle == NULL, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
- image_util_retvm_if((width == 0 || height == 0), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid resolution");
+ image_util_retvm_if((width == 0 || height == 0), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid resolution w : [%d] h : [%d]", width, height);
/* multi-src for a-gif */
if (_handle->image_type == IMAGE_UTIL_GIF) {
return IMAGE_UTIL_ERROR_INVALID_OPERATION;
}
-
-bool _image_util_check_resolution(int width, int height)
-{
- if (width <= 0) {
- image_util_error("invalid width [%d]", width);
- return false;
- }
-
- if (height <= 0) {
- image_util_error("invalid height [%d]", height);
- return false;
- }
-
- return true;
-}