Permalink
Browse files

Edi war schuld :/

git-svn-id: svn://bknr.net/svn/trunk/thirdparty/cl-gd@1598 4281704c-cde7-0310-8518-8e2dc76b1ff0
  • Loading branch information...
1 parent b530deb commit edf1b1eee5b9e1985a7c8010d9d69012c1611e41 @hanshuebner hanshuebner committed Mar 30, 2005
View
@@ -0,0 +1,58 @@
+Version 0.4.5
+2005-03-16
+Fixed type check in MAKE-STREAM-FN (thanks to Walter C. Pelissero)
+
+Version 0.4.4
+2005-03-09
+More bug fixes (thanks to Carlos Ungil)
+
+Version 0.4.3
+2005-03-09
+Some bug fixes (thanks to Carlos Ungil)
+
+Version 0.4.2
+2004-11-26
+Build GIF support by default
+Added link to cl-gd-glue.dll for Windows and corresponding documentation
+Updated files in test/orig
+
+Version 0.4.1
+2004-05-21
+Replaced WRITE-BYTE with WRITE-SEQUENCE for LispWorks - see <http://article.gmane.org/gmane.lisp.lispworks.general/1827>
+
+Version 0.3.1
+2004-04-25
+Two separate C source files (with and without GIF support)
+Added note about failed tests
+Added hyperdoc support
+Added :CL-GD to *FEATURES*
+
+Version 0.3.0
+2004-03-29
+Added GIF support (thanks to Hans H�bner)
+Added Gentoo link
+
+Version 0.2.0
+2003-10-26
+Added DO-PIXELS and friends (proposed by Kevin Rosenberg)
+Added Debian link
+
+Version 0.1.4
+2003-08-29
+Added library path for Debian compatibility (thanks to Kevin Rosenberg)
+
+Version 0.1.3
+2003-08-29
+Make CL-GD-TEST output less verbose for SBCL (thanks to Christophe Rhodes)
+
+Version 0.1.2
+2003-08-28
+Changed WITH-TRANSFORMATION macro to keep SBCL from complaining (thanks to Christophe Rhodes)
+
+Version 0.1.1
+2003-08-28
+Fixed *NULL-IMAGE* bug in DRAW-FREETYPE-STRING
+
+Version 0.1.0
+2003-08-26
+Initial release
View
65 README
@@ -0,0 +1,65 @@
+Complete documentation for CL-GD can be found in the 'doc'
+directory. Make sure to read it if you want GIF support!
+
+CL-GD also supports Nikodemus Siivola's HYPERDOC, see
+<http://common-lisp.net/project/hyperdoc/> and
+<http://www.cliki.net/hyperdoc>.
+
+1. Installation (see doc/index.html for Windows instructions)
+
+1.1. Download and install a recent version of asdf.
+
+1.2. Download and install UFFI. CL-GD needs at least version 1.3.4 of
+ UFFI to work properly. However, as of August 2003, only
+ AllegroCL, CMUCL, LispWorks, SBCL, and SCL are fully supported
+ because CL-GD needs the new UFFI macros WITH-CAST-POINTER and
+ DEF-FOREIGN-VAR which haven't yet been ported to all UFFI
+ platforms.
+
+1.3. Download and install a recent version of GD and its supporting
+ libraries libpng, zlib, libjpeg, libiconv, and libfreetype. CL-GD has
+ been tested with GD 2.0.33, versions older than 2.0.28 won't
+ work. Note that you won't be able to compile CL-GD unless you have
+ installed all supporting libraries. This is different from using
+ GD directly from C where you only have to install the libraries
+ you intend to use.
+
+1.4. Unzip and untar the file cl-gd.tgz and put the resulting
+ directory wherever you want, then cd into this directory.
+
+1.5. Compile cl-gd-glue.c into a shared library for your platform. On
+ Linux this would be
+
+ gcc -fPIC -c cl-gd-glue.c
+ ld -lgd -lz -lpng -ljpeg -lfreetype -lm -liconv -shared cl-gd-glue.o -o cl-gd-glue.so
+ rm cl-gd-glue.o
+
+1.6. Make sure that cl-gd.asd can be seen from asdf (this is usually
+ achieved by a symbolic link), start your favorite Lisp, and compile
+ CL-GD:
+
+ (asdf:oos 'asdf:compile-op :cl-gd)
+
+ From now on you can simply load CL-GD into a running Lisp image
+ with
+
+ (asdf:oos 'asdf:load-op :cl-gd)
+
+2. Test
+
+CL-GD comes with a simple test suite that can be used to check if it's
+basically working. Note that this'll only test a subset of CL-GD. To
+run the tests load CL-GD and then
+
+ (asdf:oos 'asdf:load-op :cl-gd-test)
+ (cl-gd-test:test)
+
+If you have the georgiab.ttf TrueType font from Microsoft you can also
+check the FreeType support of CL-GD with
+
+ (cl-gd-test:test #p"/usr/X11R6/lib/X11/fonts/truetype/georgiab.ttf")
+
+where you should obviously replace the path above with the full path
+to the font on your machine.
+
+(See the note about failed tests in the documentation.)
View
@@ -0,0 +1,185 @@
+/* Copyright (c) 2003-2005, Dr. Edmund Weitz. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials
+ provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include <errno.h>
+#include <stdio.h>
+#include "gd.h"
+
+gdImagePtr gdImageCreateFromJpegFile (char *filename, int *err) {
+ FILE *in;
+ gdImagePtr im;
+
+ if (in = fopen(filename, "rb")) {
+ im = gdImageCreateFromJpeg(in);
+ if (im == NULL) {
+ *err = 0;
+ return NULL;
+ }
+ fclose(in);
+ return im;
+ }
+ *err = errno;
+ return NULL;
+}
+
+gdImagePtr gdImageCreateFromGifFile (char *filename, int *err) {
+ FILE *in;
+ gdImagePtr im;
+
+ if (in = fopen(filename, "rb")) {
+ im = gdImageCreateFromGif(in);
+ if (im == NULL) {
+ *err = 0;
+ return NULL;
+ }
+ fclose(in);
+ return im;
+ }
+ *err = errno;
+ return NULL;
+}
+
+gdImagePtr gdImageCreateFromPngFile (char *filename, int *err) {
+ FILE *in;
+ gdImagePtr im;
+
+ if (in = fopen(filename, "rb")) {
+ im = gdImageCreateFromPng(in);
+ if (im == NULL) {
+ *err = 0;
+ return NULL;
+ }
+ fclose(in);
+ return im;
+ }
+ *err = errno;
+ return NULL;
+}
+
+gdImagePtr gdImageCreateFromGdFile (char *filename, int *err) {
+ FILE *in;
+ gdImagePtr im;
+
+ if (in = fopen(filename, "rb")) {
+ im = gdImageCreateFromGd(in);
+ if (im == NULL) {
+ *err = 0;
+ return NULL;
+ }
+ fclose(in);
+ return im;
+ }
+ *err = errno;
+ return NULL;
+}
+
+gdImagePtr gdImageCreateFromGd2File (char *filename, int *err) {
+ FILE *in;
+ gdImagePtr im;
+
+ if (in = fopen(filename, "rb")) {
+ im = gdImageCreateFromGd2(in);
+ if (im == NULL) {
+ *err = 0;
+ return NULL;
+ }
+ fclose(in);
+ return im;
+ }
+ *err = errno;
+ return NULL;
+}
+
+gdImagePtr gdImageCreateFromGd2PartFile (char *filename, int *err, int srcX, int srcY, int w, int h) {
+ FILE *in;
+ gdImagePtr im;
+
+ if (in = fopen(filename, "rb")) {
+ im = gdImageCreateFromGd2Part(in, srcX, srcY, w, h);
+ if (im == NULL) {
+ *err = 0;
+ return NULL;
+ }
+ fclose(in);
+ return im;
+ }
+ *err = errno;
+ return NULL;
+}
+
+gdImagePtr gdImageCreateFromXbmFile (char *filename, int *err) {
+ FILE *in;
+ gdImagePtr im;
+
+ if (in = fopen(filename, "rb")) {
+ im = gdImageCreateFromXbm(in);
+ if (im == NULL) {
+ *err = 0;
+ return NULL;
+ }
+ fclose(in);
+ return im;
+ }
+ *err = errno;
+ return NULL;
+}
+
+int gdImageGetAlpha (gdImagePtr im, int color) {
+ return gdImageAlpha(im, color);
+}
+
+int gdImageGetRed (gdImagePtr im, int color) {
+ return gdImageRed(im, color);
+}
+
+int gdImageGetGreen (gdImagePtr im, int color) {
+ return gdImageGreen(im, color);
+}
+
+int gdImageGetBlue (gdImagePtr im, int color) {
+ return gdImageBlue(im, color);
+}
+
+int gdImageGetSX (gdImagePtr im) {
+ return gdImageSX(im);
+}
+
+int gdImageGetSY (gdImagePtr im) {
+ return gdImageSY(im);
+}
+
+int gdImageGetColorsTotal (gdImagePtr im) {
+ return gdImageColorsTotal(im);
+}
+
+/* dumb names, I know... */
+int gdImageGetGetInterlaced (gdImagePtr im) {
+ return gdImageGetInterlaced(im);
+}
+
+int gdImageGetGetTransparent (gdImagePtr im) {
+ return gdImageGetTransparent(im);
+}
View
@@ -0,0 +1,45 @@
+;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
+;;; $Header: /usr/local/cvsrep/gd/cl-gd-test.asd,v 1.7 2005/03/09 14:17:56 edi Exp $
+
+;;; Copyright (c) 2003-2005, Dr. Edmund Weitz. All rights reserved.
+
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions
+;;; are met:
+
+;;; * Redistributions of source code must retain the above copyright
+;;; notice, this list of conditions and the following disclaimer.
+
+;;; * Redistributions in binary form must reproduce the above
+;;; copyright notice, this list of conditions and the following
+;;; disclaimer in the documentation and/or other materials
+;;; provided with the distribution.
+
+;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
+;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(in-package #:cl-user)
+
+(defpackage #:cl-gd-test.system
+ (:use #:cl
+ #:asdf))
+
+(in-package #:cl-gd-test.system)
+
+(defparameter *cl-gd-test-directory*
+ (make-pathname :name nil :type nil :version nil
+ :defaults (parse-namestring *load-truename*)))
+
+(defsystem #:cl-gd-test
+ :components ((:file "cl-gd-test"))
+ :depends-on (:cl-gd))
+
Oops, something went wrong.

0 comments on commit edf1b1e

Please sign in to comment.