[gimp/wip/animation: 61/197] plug-ins: fix animation panel's thumbnails.



commit 050cf792645efcb07de6f6c893784d03f0686946
Author: Jehan <jehan girinstud io>
Date:   Mon Jul 25 01:53:47 2016 +0200

    plug-ins: fix animation panel's thumbnails.
    
    When the panel is based on a layer with size different to the image,
    the thumbnail ended up wrong. Duplicate temporary the image to resize
    layers before generating thumbnails.

 .../animation-play/widgets/animation-storyboard.c  |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/animation-play/widgets/animation-storyboard.c 
b/plug-ins/animation-play/widgets/animation-storyboard.c
index 6787b02..b9cebf6 100644
--- a/plug-ins/animation-play/widgets/animation-storyboard.c
+++ b/plug-ins/animation-play/widgets/animation-storyboard.c
@@ -244,6 +244,8 @@ animation_storyboard_load (Animation           *animation,
   gint               i;
 
   image_id = animation_get_image_id (animation);
+  image_id = gimp_image_duplicate (image_id);
+  gimp_image_undo_disable (image_id);
 
   /* Cleaning previous loads. */
   gtk_container_foreach (GTK_CONTAINER (view),
@@ -318,6 +320,7 @@ animation_storyboard_load (Animation           *animation,
                         1, 1);
       gtk_widget_show (event_box);
 
+      gimp_layer_resize_to_image_size (layers[i]);
       thumbnail = gimp_drawable_get_thumbnail (layers[i], 250, 250,
                                                GIMP_PIXBUF_SMALL_CHECKS);
       image = gtk_image_new_from_pixbuf (thumbnail);
@@ -424,6 +427,7 @@ animation_storyboard_load (Animation           *animation,
   g_signal_connect (animation, "render",
                     (GCallback) animation_storyboard_rendered,
                     view);
+  gimp_image_delete (image_id);
 }
 
 static void


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