From fe7baa108f760769d2a145d8b621806731b4d16f Mon Sep 17 00:00:00 2001 From: Bart Trzynadlowski Date: Sat, 5 Feb 2022 06:44:53 +0000 Subject: [PATCH] Bitmap size field in the BITMAPV4HEADER was not being set correctly (the image viewers I've been using are unaffected by this but it ought to be corrected) --- Src/Util/BMPFile.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/Util/BMPFile.h b/Src/Util/BMPFile.h index b8a5a63..65f4caf 100644 --- a/Src/Util/BMPFile.h +++ b/Src/Util/BMPFile.h @@ -26,9 +26,9 @@ namespace Util reserved2(0), bitmap_offset(_bitmap_offset) { - id[0] = 'B'; - id[1] = 'M'; - } + id[0] = 'B'; + id[1] = 'M'; + } }; // BITMAPV4HEADER @@ -69,7 +69,7 @@ namespace Util num_planes(1), bits_per_pixel(32), compression_method(3), // BI_BITFIELDS - bitmap_size(_width*_height*3), + bitmap_size(_width*_height*4), horizontal_resolution(2835), // 72 dpi vertical_resolution(2835), num_palette_colors(0),