Commit 67db479e authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Properly determine the number of colors in an OS/2 BMP file. (#150003,

Thu Aug 12 22:19:12 2004  Matthias Clasen  <maclas@gmx.de>

	* io-bmp.c (DecodeHeader): Properly determine the number of
	colors in an OS/2 BMP file.  (#150003, Jon-Kare Hellan)
parent ff8c35e5
Thu Aug 12 22:19:12 2004 Matthias Clasen <maclas@gmx.de>
* io-bmp.c (DecodeHeader): Properly determine the number of
colors in an OS/2 BMP file. (#150003, Jon-Kare Hellan)
2004-08-12 Matthias Clasen <mclasen@redhat.com>
* pixops/pixops.c: Remove C99-isms. (#149967, Vincent Noel)
......
......@@ -269,7 +269,11 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
return FALSE;
}
clrUsed = (int) (BIH[35] << 24) + (BIH[34] << 16) + (BIH[33] << 8) + (BIH[32]);
if (State->Header.size == 12)
clrUsed = 1 << State->Header.depth;
else
clrUsed = (int) (BIH[35] << 24) + (BIH[34] << 16) + (BIH[33] << 8) + (BIH[32]);
if (clrUsed != 0)
State->Header.n_colors = clrUsed;
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment