int image_util_agif_encode_save_to_file(image_util_agif_encode_h handle, const char *file_path)
{
- int ret = IMAGE_UTIL_ERROR_NONE;
mm_gif_file_h _handle = (mm_gif_file_h)handle;
image_util_retvm_if(!_handle, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
- ret = mm_util_gif_encode_set_file(_handle, file_path);
- image_util_retvm_if(ret != MM_UTIL_ERROR_NONE, _image_error_capi(ret), "mm_util_gif_encode_set_file is failed (%d)", ret);
-
- ret = mm_util_gif_encode_save(_handle);
- image_util_retvm_if(ret != MM_UTIL_ERROR_NONE, _image_error_capi(ret), "mm_util_gif_encode_save is failed (%d)", ret);
-
- return ret;
+ return _image_error_capi(mm_util_gif_encode_save_to_file(_handle, file_path));
}
int image_util_agif_encode_save_to_buffer(image_util_agif_encode_h handle, unsigned char **buffer, size_t *buffer_size)
{
- int ret = IMAGE_UTIL_ERROR_NONE;
mm_gif_file_h _handle = (mm_gif_file_h)handle;
image_util_retvm_if(!_handle, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
- ret = mm_util_gif_encode_set_mem(_handle, (void **)buffer, buffer_size);
- image_util_retvm_if(ret != MM_UTIL_ERROR_NONE, _image_error_capi(ret), "mm_util_gif_encode_set_mem is failed (%d)", ret);
-
- ret = mm_util_gif_encode_save(_handle);
- image_util_retvm_if(ret != MM_UTIL_ERROR_NONE, _image_error_capi(ret), "mm_util_gif_encode_save is failed (%d)", ret);
-
- return ret;
+ return _image_error_capi(mm_util_gif_encode_save_to_buffer(_handle, (void **)buffer, buffer_size));
}
int image_util_agif_encode_destroy(image_util_agif_encode_h handle)