file-bmp: Rewrite code

This commit is contained in:
Mukund Sivaraman
2011-05-08 22:10:20 +05:30
parent 4978f370fe
commit a713175375

View File

@ -344,8 +344,10 @@ WriteBMP (const gchar *filename,
if (BMPSaveData.encoded == 0)
{
if (!mask_info_size) Bitmap_Head.biCompr = 0;
else Bitmap_Head.biCompr = 3;
if (mask_info_size > 0)
Bitmap_Head.biCompr = 3; /* BI_BITFIELDS */
else
Bitmap_Head.biCompr = 0; /* BI_RGB */
}
else if (BitsPerPixel == 8)
Bitmap_Head.biCompr = 1;