[nycphp-talk] GD or ImageMagick or...?
Andrew Yochum
andrew at plexpod.com
Mon Nov 28 12:02:49 EST 2005
Aaron,
On Mon, Nov 28, 2005 at 11:46:52AM -0500, Aaron Fischer wrote:
>
> CED wrote:
>
> >Aaron,
> >
> >You don't have to limit yourself to what your hosting company has provided.
> >You can run any image library you want, loading it dynamically from a page.
> >
> >-Ed
> >
> >
>
> To clarify, it's not a hosting company. I'm in a college environment
> and work in one of the administrative departments. The web server hosts
> a number of departments' web sites.
>
> The server administration is done by the Information Technology
> department. They will certainly be amenable to modification requests.
> My department is one of their most important "clients".
>
> Setting that aside for the moment. Can you give me an example or
> examples of an image library? How would I load it?
I believe Ed is referring to the dl() function. See:
http://us2.php.net/manual/en/function.dl.php
This would let you load a GD or ImageMagick php extension on-the-fly and
use whatever you chose.
You'll still need to have the shared lib built and available. I've seen
this done for Ion Cube encoded apps which load the decoder extension,
where a set of .so's for various PHP versions are part of the app's std
dist but not otherwise.
I've never had to do this as I most always have enough access/control to
build/install PHP how I need/like. Maybe Ed can provide some insight
into best practices for doing this? I'd be curious to hear about it,
but can't say I'd use it.
Give your situation of having an IT team at your becon call to setup PHP
as you see fit, I'd leave the dl() function alone.
That aside, I'd suggest going with GD to start. There is plenty of docs
out there on the subject, its been around for a while, heavily used,
well supported, and will take care of your stated needs no problem.
Using ImageMagick will require using the convert/mogrify executables or
the PECL extension. The former may not be a bad way to go but you may
find less docs directly related to use w/ PHP as your interaction with
it would be building command line args to the executables. The latter
looks like its been stalled for quite some time (since June 2004) and
may be a dead end. Other wrappers may exist, but you may find them
wanting.
HTH,
Andrew
--
Andrew Yochum
Plexpod
andrew at plexpod.com
718-360-0879
More information about the talk
mailing list