plugin: fix for errors during export of webp animation with file-webp plugin

This fixes an error during export of webp animations when the layer is size smaller than the image size.

https://bugzilla.gnome.org/show_bug.cgi?id=769872
This commit is contained in:
Benoit Touchette 2016-08-16 16:34:09 -04:00
parent 7725f1dc0e
commit 7663ff289f
1 changed files with 5 additions and 0 deletions

View File

@ -387,6 +387,8 @@ save_animation (const gchar *filename,
if (nLayers < 1)
return FALSE;
gimp_image_undo_freeze (image_ID);
do
{
gint loop;
@ -423,6 +425,9 @@ save_animation (const gchar *filename,
/* Obtain the drawable type */
drawable_type = gimp_drawable_type (allLayers[loop]);
/* fix layers to avoid offset errors */
gimp_layer_resize_to_image_size (allLayers[loop]);
/* Retrieve the buffer for the layer */
geglbuffer = gimp_drawable_get_buffer (allLayers[loop]);
extent = *gegl_buffer_get_extent (geglbuffer);