[gimp] file-bmp: All 16 and 32-bpp files need the masks to be written



commit b100b14111725bf9ad7a48db096ae4ad65a81bc5
Author: Mukund Sivaraman <muks banu com>
Date:   Fri Sep 21 20:09:51 2012 +0530

    file-bmp: All 16 and 32-bpp files need the masks to be written
    
    See #678250, #678252, etc. for example bug reports.

 plug-ins/file-bmp/bmp-write.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/file-bmp/bmp-write.c b/plug-ins/file-bmp/bmp-write.c
index a3f5631..f71ecb0 100644
--- a/plug-ins/file-bmp/bmp-write.c
+++ b/plug-ins/file-bmp/bmp-write.c
@@ -268,6 +268,7 @@ WriteBMP (const gchar  *filename,
       if (interactive && !save_dialog (channels))
         return GIMP_PDB_CANCEL;
 
+      /* mask_info_size is only set to non-zero for 16- and 32-bpp */
       switch (BMPSaveData.rgb_format)
         {
         case RGB_888:
@@ -275,6 +276,7 @@ WriteBMP (const gchar  *filename,
           break;
         case RGBA_8888:
           BitsPerPixel = 32;
+          mask_info_size = 16;
           break;
         case RGBX_8888:
           BitsPerPixel = 32;
@@ -290,6 +292,7 @@ WriteBMP (const gchar  *filename,
           break;
         case RGB_555:
           BitsPerPixel = 16;
+          mask_info_size = 16;
           break;
         default:
           g_return_val_if_reached (GIMP_PDB_EXECUTION_ERROR);



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