* Don't use ADesc.Depth as biBitCount, it can only be used in case of a 24 bits image. Fixes #0017234

git-svn-id: trunk@27235 -
This commit is contained in:
marc 2010-08-29 16:30:24 +00:00
parent 1b96dd26cd
commit 74596e95e8

View File

@ -628,7 +628,11 @@ var
Info.Header.biWidth := ADesc.Width;
Info.Header.biHeight := -ADesc.Height; // create top to bottom
Info.Header.biPlanes := 1;
Info.Header.biBitCount := ADesc.Depth;
// for 24 bits images, BPP can be 24 or 32
// 32 shouldn't be use since we don't fill the alpha channel
if ADesc.Depth = 24
then Info.Header.biBitCount := 24
else Info.Header.biBitCount := ADesc.BitsPerPixel;
Info.Header.biCompression := BI_RGB;
{Info.Header.biSizeImage := 0;}
{ first color is black, second color is white, for monochrome bitmap }