From 6f654c6f1ee4d9abe02da41c02c36498a574ff0f Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Tue, 28 Feb 2006 00:45:15 +0000 Subject: [project @ 2006-02-28 00:45:15 by rjw] Implement bitfield encoding for BMPs. We now correctly decode every image in the BMP test suite at http://pobox.com/~jason1/bmpsuite/ svn path=/import/netsurf/; revision=2099 --- image/bmpread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'image/bmpread.h') diff --git a/image/bmpread.h b/image/bmpread.h index 275374e5a..60b9d9854 100644 --- a/image/bmpread.h +++ b/image/bmpread.h @@ -31,7 +31,6 @@ typedef enum { BMP_ENCODING_BITFIELDS = 3 } bmp_encoding; - struct bmp_image { unsigned char *bmp_data; /** pointer to BMP data */ unsigned int buffer_size; /** total number of bytes of BMP data available */ @@ -45,6 +44,8 @@ struct bmp_image { bool reversed; /** scanlines are top to bottom */ bool decoded; /** whether the image has been decoded */ bool ico; /** image is part of an ICO, mask follows */ + unsigned int mask[4]; /** four bitwise mask */ + int shift[4]; /** four bitwise shifts */ struct bitmap *bitmap; /** decoded image */ }; -- cgit v1.2.3