77 #include "jasper/jas_types.h"
83 #define BMP_MAGIC 0x4d42
89 #define BMP_INFOLEN 40
92 #define BMP_PALLEN(info) ((info)->numcolors * 4)
95 #define BMP_HASPAL(info) ((info)->numcolors > 0)
100 #define BMP_ENC_RLE8 1
101 #define BMP_ENC_RLE4 2
116 int_fast16_t reserved1;
119 int_fast16_t reserved2;
159 int_fast16_t numplanes;
165 int_fast32_t enctype;
177 int_fast32_t numcolors;
180 int_fast32_t mincolors;
183 bmp_palent_t *palents;
192 #define bmp_issupported(hdr, info) \
193 ((hdr)->magic == BMP_MAGIC && !(hdr)->reserved1 && \
194 !(hdr)->reserved2 && (info)->numplanes == 1 && \
195 ((info)->depth == 8 || (info)->depth == 24) && \
196 (info)->enctype == BMP_ENC_RGB)
199 #define bmp_haspal(info) \
203 int bmp_numcmpts(bmp_info_t *info);
206 bmp_info_t *bmp_info_create(
void);
209 void bmp_info_destroy(bmp_info_t *info);
212 int bmp_isgrayscalepal(bmp_palent_t *palents,
int numpalents);