}
if (!_handle->current_resolution_count) {
- mm_util_gif_encode_set_width(gif_data, width);
- mm_util_gif_encode_set_height(gif_data, height);
+ gif_data->width = width;
+ gif_data->height = height;
_handle->width = width;
_handle->height = height;
} else if ((width > gif_data->frames[0]->width) || (height > gif_data->frames[0]->height)) {
_handle->image_count++;
}
- mm_util_gif_encode_set_frame_delay_time(gif_data->frames[_handle->current_delay_count], delay_time);
+ gif_data->frames[_handle->current_delay_count]->delay_time = delay_time;
_handle->current_delay_count++;
return err;
/* initialize buffer and value for source buffer */
if (_handle->image_type == IMAGE_UTIL_GIF) {
- void *tmp_buffer = NULL;
+ void **tmp_buffer = NULL;
if (_handle->is_encoded) {
_image_util_encode_destroy_gif_buffer(_handle->image_h);
err = _image_util_encode_create_gif_buffer(_handle->image_h);
_handle->current_resolution_count = 0;
_handle->current_delay_count = 0;
}
- tmp_buffer = (void *)realloc(_handle->src_buffer, (_handle->current_buffer_count + 1) * sizeof(void *));
+ tmp_buffer = (void **)realloc(_handle->src_buffer, (_handle->current_buffer_count + 1) * sizeof(void *));
image_util_retvm_if((tmp_buffer == NULL), IMAGE_UTIL_ERROR_OUT_OF_MEMORY, "memory reallocation failed");
_handle->src_buffer = tmp_buffer;
_handle->src_buffer[_handle->current_buffer_count] = (void *)src_buffer;
return MM_UTIL_ERROR_INVALID_OPERATION;
}
- mm_util_gif_encode_set_image_count(gif_data, _handle->image_count);
+ gif_data->image_count = _handle->image_count;
err = mm_util_encode_gif(gif_data);
if (err == MM_UTIL_ERROR_NONE) {