[gimp] plug-ins: animation-play gets the image palette for no reason.



commit 7b638d72f639cf9f73a13563405afe67f90ecbc8
Author: Jehan <jehan girinstud io>
Date:   Fri Oct 4 21:33:18 2013 +1300

    plug-ins: animation-play gets the image palette for no reason.

 plug-ins/common/animation-play.c |   19 -------------------
 1 files changed, 0 insertions(+), 19 deletions(-)
---
diff --git a/plug-ins/common/animation-play.c b/plug-ins/common/animation-play.c
index f426326..7f0577d 100644
--- a/plug-ins/common/animation-play.c
+++ b/plug-ins/common/animation-play.c
@@ -158,8 +158,6 @@ static guint              width                     = -1,
 static gint32            *layers                    = NULL;
 static gint32             total_layers              = 0;
 static GimpImageBaseType  imagetype;
-static guchar            *palette                   = NULL;
-static gint               ncolors;
 
 static GtkWidget         *drawing_area              = NULL;
 static guchar            *drawing_area_data         = NULL;
@@ -1085,7 +1083,6 @@ initialize (void)
 {
   /* Freeing existing data after a refresh. */
   g_free (layers);
-  g_free (palette);
 
   /* Catch the case when the user has closed the image in the meantime. */
   if (! gimp_image_is_valid (image_id))
@@ -1100,22 +1097,6 @@ initialize (void)
   layers    = gimp_image_get_layers (image_id, &total_layers);
   imagetype = gimp_image_base_type (image_id);
 
-  if (imagetype == GIMP_INDEXED)
-    {
-      palette = gimp_image_get_colormap (image_id, &ncolors);
-    }
-  else if (imagetype == GIMP_GRAY)
-    {
-      gint i;
-
-      palette = g_new (guchar, 768);
-
-      for (i = 0; i < 256; i++)
-        palette[i * 3] = palette[i * 3 + 1] = palette[i * 3 + 2] = i;
-
-      ncolors = 256;
-    }
-
   if (!window)
     build_dialog (gimp_image_get_name (image_id));
   refresh_dialog (gimp_image_get_name (image_id));


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