diff tools/libgfx.h @ 1886:1af79412f249

Remove the stdio FILE support from libgfx API, now only DMResource is supported.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 25 Jun 2018 13:52:20 +0300
parents a20655e40e6c
children cbc911ffd21e
line wrap: on
line diff
--- a/tools/libgfx.h	Mon Jun 25 13:24:50 2018 +0300
+++ b/tools/libgfx.h	Mon Jun 25 13:52:20 2018 +0300
@@ -102,10 +102,8 @@
     int  fmtid;  // DM_IMGFMT_*
     int  flags;  // DM_FMT_* flags
     int  (*probe)(const Uint8 *buf, const size_t len);
-    int  (*read)(const char *filename, DMImage **pimg);
-    int  (*readFILE)(DMResource *fp, DMImage **pimg);
-    int  (*write)(const char *filename, const DMImage *pimg, const DMImageConvSpec *spec);
-    int  (*writeFILE)(DMResource *fp, const DMImage *pimg, const DMImageConvSpec *spec);
+    int  (*read)(DMResource *fp, DMImage **pimg);
+    int  (*write)(DMResource *fp, const DMImage *pimg, const DMImageConvSpec *spec);
 } DMImageFormat;
 
 
@@ -124,26 +122,24 @@
 BOOL dmImagePaletteAlloc(DMImage *img, int ncolors, int ctransp);
 
 
-int dmWriteImageData(const DMImage *img, void *cbdata, int (*writeRowCB)(void *, const Uint8 *, const size_t), const DMImageConvSpec *spec);
+int dmWriteImageData(const DMImage *img, void *cbdata,
+    int (*writeRowCB)(void *, const Uint8 *, const size_t), const DMImageConvSpec *spec);
+
 
-int dmWriteRAWImageFILE(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec);
-int dmWriteRAWImage(const char *filename, const DMImage *img, const DMImageConvSpec *spec);
+int dmWriteIFFMasterRAWHeader(DMResource *fp, const char *filename, const char *prefix, const DMImage *img, const DMImageConvSpec *spec, const int fmtid);
+int dmWriteRAWImage(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec);
 
-int dmWritePPMImageFILE(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec);
-int dmWritePPMImage(const char *filename, const DMImage *img, const DMImageConvSpec *spec);
+int dmWritePPMImage(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec);
 
 #ifdef DM_USE_LIBPNG
-int dmWritePNGImageFILE(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec);
-int dmWritePNGImage(const char *filename, const DMImage *img, const DMImageConvSpec *spec);
+int dmWritePNGImage(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec);
+int dmReadPNGImage(DMResource *fp, DMImage **pimg);
 #endif
 
-int dmWritePCXImageFILE(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec);
-int dmWritePCXImage(const char *filename, const DMImage *img, const DMImageConvSpec *spec);
-int dmReadPCXImageFILE(DMResource *fp, DMImage **pimg);
-int dmReadPCXImage(const char *filename, DMImage **pimg);
+int dmWritePCXImage(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec);
+int dmReadPCXImage(DMResource *fp, DMImage **pimg);
 
-int dmReadILBMImageFILE(DMResource *fp, DMImage **pimg);
-int dmReadILBMImage(const char *filename, DMImage **pimg);
+int dmReadILBMImage(DMResource *fp, DMImage **pimg);
 
 
 typedef struct _DMBitStreamContext