Mercurial > hg > dmlib
comparison tools/lib64fmts.c @ 2208:90ec1ec89c56
Revamp the palette handling in lib64gfx somewhat, add helper functions to
lib64util for handling external palette file options and add support for
specifying one of the "internal" palettes or external (.act) palette file to
gfxconv and 64vw.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 14 Jun 2019 05:01:12 +0300 |
parents | 9f3fb4004c20 |
children | 75b5bb490f38 |
comparison
equal
deleted
inserted
replaced
2207:1ea48084055e | 2208:90ec1ec89c56 |
---|---|
1543 static int fmtConvertECIBMP2Image(DMImage *dst, const DMC64Image *src, | 1543 static int fmtConvertECIBMP2Image(DMImage *dst, const DMC64Image *src, |
1544 const DMC64ImageFormat *fmt, const DMC64ImageConvSpec *spec) | 1544 const DMC64ImageFormat *fmt, const DMC64ImageConvSpec *spec) |
1545 { | 1545 { |
1546 int res; | 1546 int res; |
1547 | 1547 |
1548 if (spec->pal != NULL) | 1548 if ((res = dmC64SetImagePalette(dst, spec, TRUE)) != DMERR_OK) |
1549 dst->pal = spec->pal; | |
1550 else | |
1551 if ((res = dmC64SetImagePalette(dst, spec->cpal, TRUE)) != DMERR_OK) | |
1552 return res; | 1549 return res; |
1553 | 1550 |
1554 return dmC64ConvertGenericBMP2Image(dst, src, fmt, spec); | 1551 return dmC64ConvertGenericBMP2Image(dst, src, fmt, spec); |
1555 } | 1552 } |
1556 | 1553 |