- if (header->biSize == sizeof(BITMAPCOREHEADER))
- {
- BITMAPCOREHEADER *core = (BITMAPCOREHEADER *)header;
- *width = core->bcWidth;
- *height = core->bcHeight;
- *planes = core->bcPlanes;
- *bpp = core->bcBitCount;
- *compr = 0;
- *size = 0;
- return 0;
- }
-
- if (header->biSize == sizeof(BITMAPINFOHEADER))
- {
- *width = header->biWidth;
- *height = header->biHeight;
- *planes = header->biPlanes;
- *bpp = header->biBitCount;
- *compr = header->biCompression;
- *size = header->biSizeImage;
- return 1;
- }
-
- if (header->biSize == sizeof(BITMAPV4HEADER))
- {
- BITMAPV4HEADER *v4hdr = (BITMAPV4HEADER *)header;
- *width = v4hdr->bV4Width;
- *height = v4hdr->bV4Height;
- *planes = v4hdr->bV4Planes;
- *bpp = v4hdr->bV4BitCount;
- *compr = v4hdr->bV4V4Compression;
- *size = v4hdr->bV4SizeImage;
- return 4;
- }
-
- if (header->biSize == sizeof(BITMAPV5HEADER))
- {
- BITMAPV5HEADER *v5hdr = (BITMAPV5HEADER *)header;
- *width = v5hdr->bV5Width;
- *height = v5hdr->bV5Height;
- *planes = v5hdr->bV5Planes;
- *bpp = v5hdr->bV5BitCount;
- *compr = v5hdr->bV5Compression;
- *size = v5hdr->bV5SizeImage;
- return 5;
- }
- DPRINT("(%ld): wrong size for header\n", header->biSize );
- return -1;
+ if (header->biSize == sizeof(BITMAPV5HEADER))
+ {
+ BITMAPV5HEADER *v5hdr = (BITMAPV5HEADER *)header;
+ *width = v5hdr->bV5Width;
+ *height = v5hdr->bV5Height;
+ *planes = v5hdr->bV5Planes;
+ *bpp = v5hdr->bV5BitCount;
+ *compr = v5hdr->bV5Compression;
+ *size = v5hdr->bV5SizeImage;
+ return 5;
+ }
+ DPRINT("(%ld): wrong size for header\n", header->biSize );
+ return -1;