[gimp/gimp-2-8] file-bmp: Print compression method in debug build



commit 121b4d1fa832f9b8caf268be66da5602b596cc29
Author: Mukund Sivaraman <muks banu com>
Date:   Thu Aug 28 19:27:07 2014 +0530

    file-bmp: Print compression method in debug build
    
    (cherry picked from commit 24cf89aa68b634d76d54995e5f4915466b28b28d)

 plug-ins/file-bmp/bmp-read.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/file-bmp/bmp-read.c b/plug-ins/file-bmp/bmp-read.c
index 92a1871..11d7414 100644
--- a/plug-ins/file-bmp/bmp-read.c
+++ b/plug-ins/file-bmp/bmp-read.c
@@ -326,6 +326,10 @@ ReadBMP (const gchar  *name,
 
       if (Bitmap_Head.biCompr == BI_BITFIELDS)
         {
+#ifdef DEBUG
+          g_print ("Got BI_BITFIELDS compression\n");
+#endif
+
           if (!ReadOK (fd, buffer, 3 * sizeof (guint32)))
             {
               g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
@@ -341,6 +345,10 @@ ReadBMP (const gchar  *name,
         }
       else if (Bitmap_Head.biCompr == BI_RGB)
         {
+#ifdef DEBUG
+          g_print ("Got BI_RGB compression\n");
+#endif
+
           setMasksDefault (Bitmap_Head.biBitCnt, masks);
         }
       else if ((Bitmap_Head.biCompr != BI_RLE4) && (Bitmap_Head.biCompr != BI_RLE8))
@@ -351,6 +359,10 @@ ReadBMP (const gchar  *name,
                        Bitmap_Head.biCompr,
                        gimp_filename_to_utf8 (filename));
         }
+
+#ifdef DEBUG
+      g_print ("Got BI_RLE4 or BI_RLE8 compression\n");
+#endif
     }
   else if (Bitmap_File_Head.biSize >= 56 && Bitmap_File_Head.biSize <= 64)
     /* enhanced Windows format with bit masks */
@@ -412,10 +424,18 @@ ReadBMP (const gchar  *name,
 
       if (Bitmap_Head.biCompr == BI_BITFIELDS)
         {
+#ifdef DEBUG
+          g_print ("Got BI_BITFIELDS compression\n");
+#endif
+
           ReadChannelMasks (&Bitmap_Head.masks[0], masks, 4);
         }
       else if (Bitmap_Head.biCompr == BI_RGB)
         {
+#ifdef DEBUG
+          g_print ("Got BI_RGB compression\n");
+#endif
+
           setMasksDefault (Bitmap_Head.biBitCnt, masks);
         }
     }


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