src/hg/lib/hvGfx.c 1.4
1.4 2009/08/05 23:34:31 angie
Added conditional use (USE_PNG) of external library libpng (http://libpng.org/pub/png/, sourceforge) to write memgfx images in the PNG format instead of GIF. Currently used (conditionally!) only for hgTracks' main image. This is to support Tim's enhancements for horizontal scrolling of the browser track image. Image file size also appears smaller than GIF but should try more test cases.
Index: src/hg/lib/hvGfx.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/hvGfx.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -B -U 4 -r1.3 -r1.4
--- src/hg/lib/hvGfx.c 7 Mar 2008 18:47:41 -0000 1.3
+++ src/hg/lib/hvGfx.c 5 Aug 2009 23:34:31 -0000 1.4
@@ -26,8 +26,16 @@
{
return hvGfxAlloc(vgOpenGif(width, height, fileName));
}
+#ifdef USE_PNG
+struct hvGfx *hvGfxOpenPng(int width, int height, char *fileName, boolean useAlpha)
+/* Open up something that we'll write out as a PNG someday. */
+{
+return hvGfxAlloc(vgOpenPng(width, height, fileName, useAlpha));
+}
+#endif//def USE_PNG
+
struct hvGfx *hvGfxOpenPostScript(int width, int height, char *fileName)
/* Open up something that will someday be a PostScript file. */
{
return hvGfxAlloc(vgOpenPostScript(width, height, fileName));