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,10 +1457,10 @@ 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;
line_size=((Main_image_width >> 3)+1) << 3;
else if (line_size & 3)
line_size=Main_image_width; line_size += (4 - (line_size & 3));
header.Signature[0] = 'B'; header.Signature[0] = 'B';
header.Signature[1] = 'M'; header.Signature[1] = 'M';