a3281f499e2cf150e5dbebbc7c1aadb2742b0333
braney
  Thu Jul 1 17:11:17 2010 -0700
set up HTML to have the right file type
diff --git src/hg/phyloGif/phyloGif.c src/hg/phyloGif/phyloGif.c
index 9577dbe..39834f3 100644
--- src/hg/phyloGif/phyloGif.c
+++ src/hg/phyloGif/phyloGif.c
@@ -718,20 +718,27 @@
     }
 
 
+#ifndef USE_PNG
 if (onWeb)
     {
     printf("Content-type: image/gif\r\n");
     printf("\r\n");
     }
-#ifdef USE_PNG
-if (!mgSaveToPng(stdout, mg, FALSE))
+
+if (!mgSaveToGif(stdout, mg, FALSE))
     {
-    errAbort("Couldn't save png to stdout");
+    errAbort("Couldn't save gif to stdout");
     }
 #else
-if (!mgSaveToGif(stdout, mg, FALSE))
+if (onWeb)
     {
-    errAbort("Couldn't save gif to stdout");
+    printf("Content-type: image/png\r\n");
+    printf("\r\n");
+    }
+
+if (!mgSaveToPng(stdout, mg, FALSE))
+    {
+    errAbort("Couldn't save png to stdout");
     }
 #endif