[gimp] file-tga: Simplify has_alpha expression



commit baf856e79d45a239dfdc7b63633e4d71563fb0c5
Author: Mukund Sivaraman <muks banu com>
Date:   Wed Dec 5 00:45:36 2012 +0530

    file-tga: Simplify has_alpha expression
    
    Also fix variable name that changed from gimp-2-8 to master. This and
    the last commit were cherry-picked from the gimp-2-8 branch.

 plug-ins/common/file-tga.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c
index fcfd4fc..a0802d3 100644
--- a/plug-ins/common/file-tga.c
+++ b/plug-ins/common/file-tga.c
@@ -927,12 +927,9 @@ read_line (FILE         *fp,
     }
   else if (convert_cmap)
     {
-      gboolean has_alpha = (info->colorMapSize > 24) ||
-                            ((info->colorMapSize == 16 ||
-                              info->colorMapSize == 15) &&
-                             (info->alphaBits > 0));
+      gboolean has_alpha = (info->alphaBits > 0);
 
-      apply_colormap (row, buffer, info->width, convert_cmap, has_alpha);
+      apply_colormap (row, buf, info->width, convert_cmap, has_alpha);
     }
   else
     {



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