Fix the bmp saving (once again).

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1240 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2009-12-23 17:34:25 +00:00
parent 107875b768
commit 9f9eede8ab

View File

@ -1457,11 +1457,11 @@ void Save_BMP(void)
{ {
// Image width must be a multiple of 4 bytes // Image width must be a multiple of 4 bytes
if (Main_image_width & 3)
line_size=((Main_image_width >> 3)+1) << 3;
else
line_size = Main_image_width; line_size = Main_image_width;
if (line_size & 3)
line_size += (4 - (line_size & 3));
header.Signature[0] = 'B'; header.Signature[0] = 'B';
header.Signature[1] = 'M'; header.Signature[1] = 'M';
header.Size_1 =(line_size*Main_image_height)+1078; header.Size_1 =(line_size*Main_image_height)+1078;