Accept the 108 byte header of BMP v4. (#168799)

2005-05-27  Matthias Clasen  <mclasen@redhat.com>

	* io-bmp.c: Accept the 108 byte header of BMP v4.  (#168799)
This commit is contained in:
Matthias Clasen 2005-05-27 15:52:19 +00:00 committed by Matthias Clasen
parent 825224b817
commit 17896bb74f
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-05-27 Matthias Clasen <mclasen@redhat.com>
* io-bmp.c: Accept the 108 byte header of BMP v4. (#168799)
2005-05-25 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf.symbols:

View File

@ -265,7 +265,12 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
#endif
State->Header.size = lsb_32 (&BIH[0]);
if (State->Header.size == 40) {
if (State->Header.size == 108) {
State->Header.width = lsb_32 (&BIH[4]);
State->Header.height = lsb_32 (&BIH[8]);
State->Header.depth = lsb_16 (&BIH[14]);
State->Compressed = lsb_32 (&BIH[16]);
} else if (State->Header.size == 40) {
State->Header.width = lsb_32 (&BIH[4]);
State->Header.height = lsb_32 (&BIH[8]);
State->Header.depth = lsb_16 (&BIH[14]);