continue;
}
- ret = image_util_frame_set_resolution(frame, g_test_decode[i].width, g_test_decode[i].height);
- if (ret != IMAGE_UTIL_ERROR_NONE) {
- image_util_frame_destroy(frame);
- continue;
- }
-
ret = image_util_frame_set_gif_delay(frame, 50);
if (ret != IMAGE_UTIL_ERROR_NONE) {
image_util_frame_destroy(frame);
/**
* @internal
-* @brief Sets the resolution of the frame to encode.
-* @since_tizen 4.0
-*
-* @param[in] frame_h The frame handle to encode
-* @param[in] width The width of the frame
-* @param[in] height The height of the frame
-*
-* @return @c 0 on success,
-* otherwise a negative error value
-*
-* @retval #IMAGE_UTIL_ERROR_NONE Successful
-* @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
-* @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation
-*
-* @pre image_util_encode_frame_create()
-* @see image_util_encode_frame_create()
-*/
-int image_util_frame_set_resolution(image_util_frame_h frame_h, const int width, const int height);
-
-/**
-* @internal
* @brief Sets the delay of the gif.
* @since_tizen 4.0
*
err = _image_util_encode_get_gif_frame(gif_data, _handle->current_resolution_count, &frame);
image_util_retvm_if((err != IMAGE_UTIL_ERROR_NONE), err, "_image_util_encode_get_gif_frame failed %d", err);
- err = mm_util_gif_image_set_position(frame, 0, 0, (int)width, (int)height);
- image_util_retvm_if((err != MM_UTIL_ERROR_NONE), _image_error_capi(ERR_TYPE_ENCODE, err), "mm_util_gif_image_set_position failed %d", err);
-
_handle->current_resolution_count++;
return err;
return IMAGE_UTIL_ERROR_NONE;
}
-int image_util_frame_set_resolution(image_util_frame_h frame_h, const int width, const int height)
-{
- int ret = MM_UTIL_ERROR_NONE;
-
- image_util_retvm_if((frame_h == NULL), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
- image_util_retvm_if((width <= 0) || (height <= 0), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Width or Height");
-
- frame_s *frame = (frame_s *)frame_h;
-
- ret = mm_util_gif_image_set_position(frame->frame_h, 0, 0, width, height);
- if (ret != MM_UTIL_ERROR_NONE) {
- image_util_error("mm_util_gif_image_set_position is failed(%d).", ret);
- return _image_error_capi(ERR_TYPE_ENCODE, ret);
- }
-
- return IMAGE_UTIL_ERROR_NONE;
-}
-
int image_util_frame_set_gif_delay(image_util_frame_h frame_h, const int delay_time)
{
int ret = MM_UTIL_ERROR_NONE;