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



commit 2af0e143706128842cae71850f3aa2a3cd418bf7
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]