Mercurial > hg > dmlib
diff tools/gfxconv.c @ 1896:f80b2dc77c30
Work begins on IFF ILBM/PBM image writer. It is pretty broken, some things
will not work and some things are hardcoded. The ByteRun1 compression
implementation is somewhat inefficient. Interleaved files do not work yet.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 26 Jun 2018 03:13:38 +0300 |
parents | 334501b6cce5 |
children | 699ee626912b |
line wrap: on
line diff
--- a/tools/gfxconv.c Tue Jun 26 03:09:01 2018 +0300 +++ b/tools/gfxconv.c Tue Jun 26 03:13:38 2018 +0300 @@ -1228,7 +1228,6 @@ } } - return DMERR_OK; } @@ -1359,6 +1358,16 @@ } break; + case DM_IMGFMT_IFF: + spec->compression = 1; + spec->nplanes = 0; + for (int n = 0; n < 8; n++) + { + if (image->ncolors & (1 << n)) + spec->nplanes = n; + } + break; + default: spec->format = spec->paletted ? DM_COLFMT_PALETTE : DM_COLFMT_RGB; }