]> granicus.if.org Git - graphviz/commitdiff
make gd always generate indexed color pngs, responding to #2502
authorJohn Ellson <ellson@research.att.com>
Mon, 24 Nov 2014 16:34:32 +0000 (11:34 -0500)
committerJohn Ellson <ellson@research.att.com>
Mon, 24 Nov 2014 16:34:32 +0000 (11:34 -0500)
plugin/gd/gvdevice_gd.c

index 3267ba16addcf265b9f8915f709b40b292fb0672..2c50d69e980eef6e8a1d00931cdb5ac327af6562 100644 (file)
@@ -136,7 +136,7 @@ static void gd_format(GVJ_t * job)
 
 #ifdef HAVE_GD_PNG
     case FORMAT_PNG:
-       gdImageSaveAlpha(im, TRUE);
+        gdImageTrueColorToPalette(im, 0, 256);
        gdImagePngCtx(im, &ctx);
         break;
 #endif