diff 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
line wrap: on
line diff
--- a/tools/lib64fmts.c	Fri Jun 14 00:00:27 2019 +0300
+++ b/tools/lib64fmts.c	Fri Jun 14 00:42:36 2019 +0300
@@ -1545,7 +1545,10 @@
 {
     int res;
 
-    if ((res = dmSetMixedColorC64Palette(dst)) != DMERR_OK)
+    if (spec->pal != NULL)
+        dst->pal = spec->pal;
+    else
+    if ((res = dmC64SetImagePalette(dst, spec->cpal, TRUE)) != DMERR_OK)
         return res;
 
     return dmC64ConvertGenericBMP2Image(dst, src, fmt, spec);