diff 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
line wrap: on
line diff
--- a/tools/lib64gfx.h	Thu May 10 02:43:16 2018 +0300
+++ b/tools/lib64gfx.h	Thu May 10 03:46:36 2018 +0300
@@ -170,10 +170,13 @@
     int ch_width, ch_height; // Width and height in charblocks
 
     int  (*probe)(const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt);
+
     int  (*decode)(DMC64Image *img, const Uint8 *buf, const size_t len, const struct _DMC64ImageFormat *fmt);
-    int  (*encode)(DMC64Image *img, Uint8 **buf, size_t *len, const struct _DMC64ImageFormat *fmt);
+    int  (*encode)(Uint8 **buf, size_t *len, const DMC64Image *img, const struct _DMC64ImageFormat *fmt);
+
     int  (*convertFrom)(DMImage *, const DMC64Image *, const struct _DMC64ImageFormat *fmt);
-    int  (*convertTo)(DMImage *, DMC64Image *, const struct _DMC64ImageFormat *fmt);
+    int  (*convertTo)(DMC64Image *, const DMImage *, const struct _DMC64ImageFormat *fmt);
+
     DMC64GetPixelFunc getPixel;
 
     DMC64EncDecOp encdecOps[D64_MAX_ENCDEC_OPS];
@@ -192,12 +195,13 @@
 char *    dmC64GetImageTypeString(char *buf, const size_t len, const int type);
 int       dmC64ConvertCSDataToImage(DMImage *img, int xoffs, int yoffs, const Uint8 *inBuf, int width, int height, BOOL multicolor, int *colors);
 
+int       dmC64ProbeBMP(const Uint8 *buf, const size_t len, const DMC64ImageFormat **fmt);
+
 int       dmC64DecodeGenericBMP(DMC64Image *img, const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt);
 int       dmC64EncodeGenericBMP(Uint8 **pbuf, size_t *plen, const DMC64Image *img, const DMC64ImageFormat *fmt);
 int       dmC64ConvertGenericBMP2Image(DMImage *dst, const DMC64Image *src, const DMC64ImageFormat *fmt);
 
 int       dmC64ConvertBMP2Image(DMImage **pdst, const DMC64Image *src, const DMC64ImageFormat *fmt);
-int       dmC64ProbeBMP(const Uint8 *buf, const size_t len, const DMC64ImageFormat **fmt);
 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);