- update compatibility info for trunk
- update compatibility info for trunk
git-svn-id: https://siedziba.pl:790/svn/repos/php-imlib/trunk@335 455248ca-bdda-0310-9134-f4ebb693071a
PHP Imlib2 Extension (php_imlib)
================================
This extension, as one might expect, provides access to Rasterman's
excellent image library, Imlib2.
Requirements
------------
Current version of php-imlib has been tested with:
PHP-5.0.3
Imlib2-1.1.2
freetype-2.1.7
t1lib-5.0.2-1
libjpeg-6b
libpng-1.2.8
libtiff-3.7.1
libungif-4.1.3
Caveats
-------
Imlib2 is not thread safe. While this isn't a large concern at the
moment, it will become a more important issue as Apache 2 develops and
threaded httpd installations become more common.
About php_imlib
---------------
The general idea behind php_imlib is to mimick the function names and their
parameters as closely as possible at the extension level. However since
Imlib2 uses a singleton context that I'd rather not duplicate in the
extension, most functions will require extra parameters to establish context.
As we've developed php_imlib, a few needs have also come up which Imlib2
doesn't address. In those cases we've defined functions in php_imlib which
aren't present in Imlib2. So far we've added three functions:
imlib_dump_image, for outputting an image to stdout (Comporable to GD's
ImagePng($im)), imlib_image_modify_alpha, and imlib_create_scaled_image, a
shortcut of imlib_create_cropped_scaled_image, which is ideal for creating a
scaled copy of the whole image quickly, such as for generating thumbnails.
To combat the need to have a large number parameters for some of the more
complex functions, I had written a single PHP class to wrap the extension in
version 0.1. However as I developed 0.2, that clearly became insufficent. So,
starting with 0.2 I've included a handful of more reasonably sized classes
that spread things out nicely. I'm fairly pleased with how they've turned
out, but as always, feedback is encouraged. More extensive documentation on
the classes is available in the phpdoc directory. ( Note: classes are
currently outdated. Any volunteers for making them up to date? )
In the first release, I had also included an abstract image class that
allowed the use of GD and php_imlib with the same code. At least for the
time being, that's been scrapped, since it was never implemented fully at
the time, and would've occupied far more time than it was worth this time
around. So, I filed that one away under "bad idea".
Function Reference
------------------
The extension functions are covered in docs/api.txt, the class files are
covered in the phpdoc directory (html only).
There are some examples online at http://pp.siedziba.pl/imlib_examples