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



commit 7663ff289f8ad9fed60c1d5dc0829a9f55fbf7da
Author: Benoit Touchette <draekko software+gimp gmail com>
Date:   Tue Aug 16 16:34:09 2016 -0400

    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

 plug-ins/file-webp/file-webp-save.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/file-webp/file-webp-save.c b/plug-ins/file-webp/file-webp-save.c
index f3d3b52..4f050e4 100644
--- a/plug-ins/file-webp/file-webp-save.c
+++ b/plug-ins/file-webp/file-webp-save.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]