comparison tools/lib64gfx.h @ 1442:3773281491c9

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 10 May 2018 03:46:36 +0300
parents 4c7b456d7f0b
children 948b32bd67ef
comparison
equal deleted inserted replaced
1441:260c413304f3 1442:3773281491c9
168 168
169 int width, height; // Width and height in pixels 169 int width, height; // Width and height in pixels
170 int ch_width, ch_height; // Width and height in charblocks 170 int ch_width, ch_height; // Width and height in charblocks
171 171
172 int (*probe)(const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt); 172 int (*probe)(const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt);
173
173 int (*decode)(DMC64Image *img, const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt); 174 int (*decode)(DMC64Image *img, const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt);
174 int (*encode)(DMC64Image *img, Uint8 **buf, size_t *len, const struct _DMC64ImageFormat *fmt); 175 int (*encode)(Uint8 **buf, size_t *len, const DMC64Image *img, const struct _DMC64ImageFormat *fmt);
176
175 int (*convertFrom)(DMImage *, const DMC64Image *, const struct _DMC64ImageFormat *fmt); 177 int (*convertFrom)(DMImage *, const DMC64Image *, const struct _DMC64ImageFormat *fmt);
176 int (*convertTo)(DMImage *, DMC64Image *, const struct _DMC64ImageFormat *fmt); 178 int (*convertTo)(DMC64Image *, const DMImage *, const struct _DMC64ImageFormat *fmt);
179
177 DMC64GetPixelFunc getPixel; 180 DMC64GetPixelFunc getPixel;
178 181
179 DMC64EncDecOp encdecOps[D64_MAX_ENCDEC_OPS]; 182 DMC64EncDecOp encdecOps[D64_MAX_ENCDEC_OPS];
180 } DMC64ImageFormat; 183 } DMC64ImageFormat;
181 184
190 193
191 194
192 char * dmC64GetImageTypeString(char *buf, const size_t len, const int type); 195 char * dmC64GetImageTypeString(char *buf, const size_t len, const int type);
193 int dmC64ConvertCSDataToImage(DMImage *img, int xoffs, int yoffs, const Uint8 *inBuf, int width, int height, BOOL multicolor, int *colors); 196 int dmC64ConvertCSDataToImage(DMImage *img, int xoffs, int yoffs, const Uint8 *inBuf, int width, int height, BOOL multicolor, int *colors);
194 197
198 int dmC64ProbeBMP(const Uint8 *buf, const size_t len, const DMC64ImageFormat **fmt);
199
195 int dmC64DecodeGenericBMP(DMC64Image *img, const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt); 200 int dmC64DecodeGenericBMP(DMC64Image *img, const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt);
196 int dmC64EncodeGenericBMP(Uint8 **pbuf, size_t *plen, const DMC64Image *img, const DMC64ImageFormat *fmt); 201 int dmC64EncodeGenericBMP(Uint8 **pbuf, size_t *plen, const DMC64Image *img, const DMC64ImageFormat *fmt);
197 int dmC64ConvertGenericBMP2Image(DMImage *dst, const DMC64Image *src, const DMC64ImageFormat *fmt); 202 int dmC64ConvertGenericBMP2Image(DMImage *dst, const DMC64Image *src, const DMC64ImageFormat *fmt);
198 203
199 int dmC64ConvertBMP2Image(DMImage **pdst, const DMC64Image *src, const DMC64ImageFormat *fmt); 204 int dmC64ConvertBMP2Image(DMImage **pdst, const DMC64Image *src, const DMC64ImageFormat *fmt);
200 int dmC64ProbeBMP(const Uint8 *buf, const size_t len, const DMC64ImageFormat **fmt);
201 int dmC64DecodeBMP(DMC64Image **img, const Uint8 *buf, const size_t len, const size_t probeOffs, const size_t loadOffs, const DMC64ImageFormat **fmt, const DMC64ImageFormat *forced); 205 int dmC64DecodeBMP(DMC64Image **img, const Uint8 *buf, const size_t len, const size_t probeOffs, const size_t loadOffs, const DMC64ImageFormat **fmt, const DMC64ImageFormat *forced);
202 206
203 207
204 #ifdef __cplusplus 208 #ifdef __cplusplus
205 } 209 }