]> granicus.if.org Git - graphviz/commitdiff
restore support for gd, gd2, wbmp, formats to agree with documentation ;)
authorellson <devnull@localhost>
Thu, 6 Sep 2007 16:05:56 +0000 (16:05 +0000)
committerellson <devnull@localhost>
Thu, 6 Sep 2007 16:05:56 +0000 (16:05 +0000)
plugin/gd/gvdevice_gd.c

index 7d400b1dc5f00bcd6bb4fe4260775d2baf8470f7..bfdc4a632f54dfa0da03d43b4cda98d710ee5c59 100644 (file)
@@ -100,7 +100,6 @@ static void gd_format(GVJ_t * job)
         break;
 #endif
 
-#if 0
     case FORMAT_GD:
        gdImageGd(im, job->output_file);
        break;
@@ -114,17 +113,20 @@ static void gd_format(GVJ_t * job)
 
 #ifdef HAVE_GD_GIF
     case FORMAT_WBMP:
-       /* Use black for the foreground color for the B&W wbmp image. */
-//FIXME - black not defined - is it really needed? 
-       gdImageWBMP(im, black, job->output_file);
+       {
+           /* Use black for the foreground color for the B&W wbmp image. */
+            int black = gdImageColorResolveAlpha(im, 0, 0, 0, gdAlphaOpaque);
+           gdImageWBMP(im, black, job->output_file);
+       }
        break;
 #endif
 
+#if 0
+/* libgd only supports reading of xpm files */
 #ifdef HAVE_GD_XPM
     case FORMAT_XBM:
        gdImageXbm(im, job->output_file);
 #endif
-
 #endif
        break;
     default:
@@ -154,6 +156,7 @@ gvplugin_installed_t gvdevice_gd_types[] = {
 
 #ifdef HAVE_GD_GIF
     {FORMAT_GIF, "gif:cairo", 10, &gd_engine, &device_features_gd},
+    {FORMAT_WBMP, "wbmp:cairo", -1, &gd_engine, &device_features_gd},
 #endif
 
 #ifdef HAVE_GD_JPEG
@@ -166,14 +169,11 @@ gvplugin_installed_t gvdevice_gd_types[] = {
     {FORMAT_PNG, "png:cairo", -1, &gd_engine, &device_features_gd},
 #endif
 
-#if 0
     {FORMAT_GD, "gd:cairo", -1, &gd_engine, &device_features_gd},
     {FORMAT_GD2, "gd2:cairo", -1, &gd_engine, &device_features_gd},
 
-#ifdef HAVE_GD_GIF
-    {FORMAT_WBMP, "wbmp:cairo", -1, &gd_engine, &device_features_gd},
-#endif
-
+#if 0
+/* libgd only supports reading of xpm files */
 #ifdef HAVE_GD_XPM
     {FORMAT_XBM, "xbm:cairo", -1, &gd_engine, &device_features_gd},
 #endif