Mercurial > hg > dmlib
comparison tools/lib64fmts.c @ 2201:9f3fb4004c20
Improvements to the lib64gfx palette handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 14 Jun 2019 00:42:36 +0300 |
parents | 23dd0e0fe25d |
children | 90ec1ec89c56 |
comparison
equal
deleted
inserted
replaced
2200:dcd26cdc395e | 2201:9f3fb4004c20 |
---|---|
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 ((res = dmSetMixedColorC64Palette(dst)) != DMERR_OK) | 1548 if (spec->pal != NULL) |
1549 dst->pal = spec->pal; | |
1550 else | |
1551 if ((res = dmC64SetImagePalette(dst, spec->cpal, TRUE)) != DMERR_OK) | |
1549 return res; | 1552 return res; |
1550 | 1553 |
1551 return dmC64ConvertGenericBMP2Image(dst, src, fmt, spec); | 1554 return dmC64ConvertGenericBMP2Image(dst, src, fmt, spec); |
1552 } | 1555 } |
1553 | 1556 |