[gimp] plug-ins: When exporting BMP with color space info, always include color masks.



commit 9727a38977c0880dc54a7bd6615c8448fd477492
Author: Sebastian Rasmussen <sebras gmail com>
Date:   Thu Oct 31 16:41:36 2019 +0100

    plug-ins: When exporting BMP with color space info, always include color masks.
    
    This fixes issue #4155.

 plug-ins/file-bmp/bmp-save.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/file-bmp/bmp-save.c b/plug-ins/file-bmp/bmp-save.c
index e4a3306db2..f23319c756 100644
--- a/plug-ins/file-bmp/bmp-save.c
+++ b/plug-ins/file-bmp/bmp-save.c
@@ -352,9 +352,15 @@ save_image (GFile         *file,
     SpZeile = ((gint) (((Spcols * BitsPerPixel) / 8) / 4) + 1) * 4;
 
   if (write_color_space)
-    color_space_size = 68;
+    {
+      /* Always include color mask for BITMAPV5HEADER, see #4155. */
+      mask_info_size = 16;
+      color_space_size = 68;
+    }
   else
-    color_space_size = 0;
+    {
+      color_space_size = 0;
+    }
 
   bitmap_file_head.bfSize    = (0x36 + MapSize + (rows * SpZeile) +
                                 mask_info_size + color_space_size);


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