summaryrefslogtreecommitdiff
path: root/image/bmpread.h
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-02-28 00:45:15 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-02-28 00:45:15 +0000
commit6f654c6f1ee4d9abe02da41c02c36498a574ff0f (patch)
treee751ad7186b5b9414e213820a3f1074cb5398d35 /image/bmpread.h
parent6929d90d41e2490bf794f1a4d85e7db25ecf0169 (diff)
downloadnetsurf-6f654c6f1ee4d9abe02da41c02c36498a574ff0f.tar.gz
netsurf-6f654c6f1ee4d9abe02da41c02c36498a574ff0f.tar.bz2
[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
Diffstat (limited to 'image/bmpread.h')
-rw-r--r--image/bmpread.h3
1 files changed, 2 insertions, 1 deletions
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 */
};