[gimp] Bug 669074 - Corrected typo, spotted by David Allen, in BMP file signature.



commit 28710936265c7fa051ae7c547324b32eec283dd8
Author: Kevin Cozens <kcozens svn gnome org>
Date:   Tue Jan 31 14:37:43 2012 -0500

    Bug 669074 - Corrected typo, spotted by David Allen, in BMP file signature.

 plug-ins/file-bmp/bmp-read.c |   72 +++++++++++++++++++++---------------------
 1 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/plug-ins/file-bmp/bmp-read.c b/plug-ins/file-bmp/bmp-read.c
index 6159fd6..a1b5620 100644
--- a/plug-ins/file-bmp/bmp-read.c
+++ b/plug-ins/file-bmp/bmp-read.c
@@ -162,7 +162,7 @@ ReadBMP (const gchar  *name,
 
   if (!ReadOK (fd, magick, 2) || !(!strncmp (magick, "BA", 2) ||
      !strncmp (magick, "BM", 2) || !strncmp (magick, "IC", 2) ||
-     !strncmp (magick, "PI", 2) || !strncmp (magick, "CI", 2) ||
+     !strncmp (magick, "PT", 2) || !strncmp (magick, "CI", 2) ||
      !strncmp (magick, "CP", 2)))
     {
       g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
@@ -689,41 +689,41 @@ ReadImage (FILE                  *fd,
                                     (gdouble) max_progress);
           }
 
-	if (channels == 4)
-	  {
-	    gboolean  has_alpha = FALSE;
-
-	    /* at least one pixel should have nonzero alpha */
-	    for (ypos = 0; ypos < height; ypos++)
-	      {
-		temp = dest + (ypos * rowstride);
-		for (xpos = 0; xpos < width; xpos++)
-		  {
-		    if (temp[3])
-		      {
-			has_alpha = TRUE;
-			break;
-		      }
-		    temp += 4;
-		  }
-		if (has_alpha)
-		  break;
-	      }
-
-	    /* workaround unwanted behaviour when all alpha pixels are zero */
-	    if (!has_alpha)
-	      {
-		for (ypos = 0; ypos < height; ypos++)
-		  {
-		    temp = dest + (ypos * rowstride);
-		    for (xpos = 0; xpos < width; xpos++)
-		      {
-			temp[3] = 255;
-			temp += 4;
-		      }
-		  }
-	      }
-	  }
+    if (channels == 4)
+      {
+        gboolean  has_alpha = FALSE;
+
+        /* at least one pixel should have nonzero alpha */
+        for (ypos = 0; ypos < height; ypos++)
+          {
+        temp = dest + (ypos * rowstride);
+        for (xpos = 0; xpos < width; xpos++)
+          {
+            if (temp[3])
+              {
+            has_alpha = TRUE;
+            break;
+              }
+            temp += 4;
+          }
+        if (has_alpha)
+          break;
+          }
+
+        /* workaround unwanted behaviour when all alpha pixels are zero */
+        if (!has_alpha)
+          {
+        for (ypos = 0; ypos < height; ypos++)
+          {
+            temp = dest + (ypos * rowstride);
+            for (xpos = 0; xpos < width; xpos++)
+              {
+            temp[3] = 255;
+            temp += 4;
+              }
+          }
+          }
+      }
       }
       break;
 



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