Mercurial > hg > dmlib
diff tools/libgfx.h @ 2065:451980580189
Refactor how paletted/indexed formats are handled in libgfx.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 05 Dec 2018 13:33:03 +0200 |
parents | 3617ef01c1de |
children | 63284e9ad95e |
line wrap: on
line diff
--- a/tools/libgfx.h Wed Dec 05 13:31:59 2018 +0200 +++ b/tools/libgfx.h Wed Dec 05 13:33:03 2018 +0200 @@ -90,11 +90,12 @@ typedef struct { - int format; - int scaleX, scaleY; - int nplanes, bpp, mask; - BOOL planar, paletted; - int compression; + int fmtid; // DM_IMGFMT_* of target format (a bit of a kludge here) + int format; // Target color format DM_COLFMT_* + int scaleX, scaleY; // Scale factors (1..) + int nplanes, bpp, mask; + BOOL planar; + int compression; // Use compression/compression level (0 = none, 9 = max) } DMImageConvSpec; @@ -129,7 +130,7 @@ int (*writeRowCB)(void *, const Uint8 *, const size_t), const DMImageConvSpec *spec); -int dmWriteIFFMasterRAWHeader(DMResource *fp, const char *filename, const char *prefix, const DMImage *img, const DMImageConvSpec *spec, const int fmtid); +int dmWriteIFFMasterRAWHeader(DMResource *fp, const char *filename, const char *prefix, const DMImage *img, const DMImageConvSpec *spec); int dmWriteRAWImage(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec); int dmWritePPMImage(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec);