note 23775 deleted from function.imagecopyresampled by aidan
| From: | aidan@php.net | Date: | Mon, 04 Oct 2004 09:45:00 +0000 |
| Subject: | note 23775 deleted from function.imagecopyresampled by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77964@lists.php.net to get a copy of this message | ||
Note Submitter: christianNO-SPAM at bitpusherNO-SPAM dot org
----
In order to use this function, you must download and compile gd-2.0.1, which is available at
http://www.boutell.com/gd/
This is trickier than it seems, depending on your platform. Compiling gd requires the jpeg, png,
freetype and zlib libraries; make sure you install these packages first, and make a note of the
locations of the libraries and the header files. You will need these for the gd Makefile.
Compile gd as a static library. Insert this line of code in the gd-2.0.1 Makefile:
LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm
Make sure you specify the locations of your libraries and header files. For example, Solaris 8
installs these files by default in both /opt/sfw as well as /usr, which needs to be specified in the
Makefile.
Now type "make libgd.a"; make install is not needed. This will compile a static version
of the libgd library, which we will compile into PHP-4.2.2.
Now download and unzip the PHP-4.2.2 source code. Configure with the following flags:
--with-mysql --with-apxs=<path> --with-gd=<path-to-gd-src> --enable-gd-native-ttf
--enable-gd-imgstrttf --with-jpeg-dir=<path> --with-png-dir=<path>
--with-zlib-dir=<path>
Now a "make" and a "make install" and you will have compiled PHP-4.2.2 as a
shared object with the gd-2.0.1 libraries statically linked in.
Rasmus was kind enough to provide this information at:
http://www.php.net/~rasmus/gd.html
Thanks Rasmus!