comparison tools/lib64gfx.h @ 1465:88845f95e791

Change dmC64EncodeGenericBMP() to use DMGrowBuf, and make the necessary changes in gfxconv as well.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 10 May 2018 21:29:52 +0300
parents dcff9ac95d3f
children 32203356c652
comparison
equal deleted inserted replaced
1464:73e00bf7531c 1465:88845f95e791
8 */ 8 */
9 #ifndef LIB64GFX_H 9 #ifndef LIB64GFX_H
10 #define LIB64GFX_H 1 10 #define LIB64GFX_H 1
11 11
12 #include "libgfx.h" 12 #include "libgfx.h"
13 #include "dmgrowbuf.h"
13 14
14 #ifdef __cplusplus 15 #ifdef __cplusplus
15 extern "C" { 16 extern "C" {
16 #endif 17 #endif
17 18
170 int ch_width, ch_height; // Width and height in charblocks 171 int ch_width, ch_height; // Width and height in charblocks
171 172
172 int (*probe)(const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt); 173 int (*probe)(const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt);
173 174
174 int (*decode)(DMC64Image *img, const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt); 175 int (*decode)(DMC64Image *img, const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt);
175 int (*encode)(Uint8 **buf, size_t *len, const DMC64Image *img, const struct _DMC64ImageFormat *fmt); 176 int (*encode)(DMGrowBuf *buf, const DMC64Image *img, const struct _DMC64ImageFormat *fmt);
176 177
177 int (*convertFrom)(DMImage *, const DMC64Image *, const struct _DMC64ImageFormat *fmt); 178 int (*convertFrom)(DMImage *, const DMC64Image *, const struct _DMC64ImageFormat *fmt);
178 int (*convertTo)(DMC64Image *, const DMImage *, const struct _DMC64ImageFormat *fmt); 179 int (*convertTo)(DMC64Image *, const DMImage *, const struct _DMC64ImageFormat *fmt);
179 180
180 DMC64GetPixelFunc getPixel; 181 DMC64GetPixelFunc getPixel;
198 int dmC64ConvertCSDataToImage(DMImage *img, int xoffs, int yoffs, const Uint8 *inBuf, int width, int height, BOOL multicolor, int *colors); 199 int dmC64ConvertCSDataToImage(DMImage *img, int xoffs, int yoffs, const Uint8 *inBuf, int width, int height, BOOL multicolor, int *colors);
199 200
200 int dmC64ProbeBMP(const Uint8 *buf, const size_t len, const DMC64ImageFormat **fmt); 201 int dmC64ProbeBMP(const Uint8 *buf, const size_t len, const DMC64ImageFormat **fmt);
201 202
202 int dmC64DecodeGenericBMP(DMC64Image *img, const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt); 203 int dmC64DecodeGenericBMP(DMC64Image *img, const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt);
203 int dmC64EncodeGenericBMP(Uint8 **pbuf, size_t *plen, const DMC64Image *img, const DMC64ImageFormat *fmt); 204 int dmC64EncodeGenericBMP(DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageFormat *fmt);
204 205
205 int dmC64ConvertBMP2Image(DMImage **pdst, const DMC64Image *src, const DMC64ImageFormat *fmt); 206 int dmC64ConvertBMP2Image(DMImage **pdst, const DMC64Image *src, const DMC64ImageFormat *fmt);
206 207
207 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); 208 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);
208 209