amit wrote:
> Ok, what I did was installing it from http://www.imagemagick.org/script/install-source.php
> Then I followed all steps which finally after verification it was able
> to create a GIF file. Now, I don't know how to include it in my code.
> Once I tried to run it and PHP was complaining about new() operator.
>
> Any advice is appreciated.
Link you provided refers to ImageMagic alone, what you need to do,
is to add imagemagic extension to your PHP. Easiest way to do that,
will be to launch your system packed manager (software installation
tool) and search for php and imagemagic. You should find packed that
provides that. Most popular distributions should provide that. Although
you might need additional repositories. You can also seek for a packed
in google and download and install it.
You might also try using PECL installer to add imagick,
to do so, issue:
pecl install imagick
Note that you might need to be root to complete the installation.
If you have PHP > 5.1.3, then needed extension might already be present.
To check it, issue in your console:
php -i |grep imagick
If you get some data, then it's present.
Once the extension is loaded, you can simply use it's functions and
objects. You need not 'import' or 'include' anything.
Here is PHP image magic function reference:
http://pl.php.net/manual/pl/book.imagick.php
PS. Keep in mind, that most hosting companies do not provide this
extension. Another image library, called GD is usually compiled into PHP
and available on most hosting servers.
best regards
Piotr N