summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/gd-2.0.35/gd_ss.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-03-20 07:58:16 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-03-20 07:58:16 +0000
commit10d837d22d7d99b26f44847f92501f6037da4ec2 (patch)
treecbef7ae7354e10886bec8a68e5637e7d754c33eb /Build/source/libs/gd/gd-2.0.35/gd_ss.c
parent453e4a6601ed7f8a08029211434be8e58fc452a9 (diff)
new build system
git-svn-id: svn://tug.org/texlive/trunk@12450 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/gd-2.0.35/gd_ss.c')
-rw-r--r--Build/source/libs/gd/gd-2.0.35/gd_ss.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/Build/source/libs/gd/gd-2.0.35/gd_ss.c b/Build/source/libs/gd/gd-2.0.35/gd_ss.c
new file mode 100644
index 00000000000..18fc50d2b90
--- /dev/null
+++ b/Build/source/libs/gd/gd-2.0.35/gd_ss.c
@@ -0,0 +1,50 @@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include "gd.h"
+
+#define TRUE 1
+#define FALSE 0
+
+/* Use this for commenting out debug-print statements. */
+/* Just use the first '#define' to allow all the prints... */
+/*#define GD_SS_DBG(s) (s) */
+#define GD_SS_DBG(s)
+
+#ifdef HAVE_LIBPNG
+BGD_DECLARE(void) gdImagePngToSink (gdImagePtr im, gdSinkPtr outSink)
+{
+ gdIOCtx *out = gdNewSSCtx (NULL, outSink);
+ gdImagePngCtx (im, out);
+ out->gd_free (out);
+}
+
+BGD_DECLARE(gdImagePtr) gdImageCreateFromPngSource (gdSourcePtr inSource)
+{
+ gdIOCtx *in = gdNewSSCtx (inSource, NULL);
+ gdImagePtr im;
+
+ im = gdImageCreateFromPngCtx (in);
+
+ in->gd_free (in);
+
+ return im;
+}
+#else /* no HAVE_LIBPNG */
+BGD_DECLARE(void) gdImagePngToSink (gdImagePtr im, gdSinkPtr outSink)
+{
+ fprintf (stderr, "PNG support is not available\n");
+}
+
+BGD_DECLARE(gdImagePtr) gdImageCreateFromPngSource (gdSourcePtr inSource)
+{
+ fprintf (stderr, "PNG support is not available\n");
+ return NULL;
+}
+#endif /* HAVE_LIBPNG */