imagick_resize function does not exist

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
ivobrabec

imagick_resize function does not exist

Post by ivobrabec »

Hi,
we started to use new server and old scripts stopped working:
The old script example was like:
imagick_resize($handle, $width,$height, IMAGICK_FILTER_UNKNOWN, 0);
and new new server requires
$handle->resizeImage($handle,$width,$height, IMAGICK_FILTER_UNKNOWN, 0);

On both server is Imagick installed.
I dont understand the reason why the new server does take imagick_resize as nonexisting function? Is there something which needs to be installed in order for imagick_resize to work besides the imagick instalation?

I dont understand why in http://www.php.net is Image Magick Functions defined as imagick_.... and in http://php.oregonstate.edu/manual/en/index.php is Imagick Image Library with functions like Imagick::ResizeImage....what is the difference?


I should also mention that i have not access to the exec() function.

Please help me.
Thanks
Ivo Brabec
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: imagick_resize function does not exist

Post by mkoppanen »

The old procedural API was abandoned in favor of the new OOP API. Imagick 2.x versions do not support the old API. Your old server probably runs 0.9.x series.
Mikko Koppanen
My blog: http://valokuva.org
ivobrabec

Re: imagick_resize function does not exist

Post by ivobrabec »

ok thanks for explanation and do i need to have the ImagickPixel and ImagickDrax installed...or better...the old imagick, did it include all the features as the new one?

For example when $im->rotateImage(ImagickPixel background,90);...it requires ImagickPixel...what is this? is it something which i have to install in addition to the imagick?

Thanks
Ivo
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: imagick_resize function does not exist

Post by mkoppanen »

ivobrabec wrote: For example when $im->rotateImage(ImagickPixel background,90);...it requires ImagickPixel...what is this? is it something which i have to install in addition to the imagick?
ImagickPixel is a one class included in the Imagick package. You can see the classes in phpinfo();. ImagickPixel object is a way to describe a color in Imagick. ImagickPixel is actually the "PHP presentation" of PixelWand in MagickWand C API.
Mikko Koppanen
My blog: http://valokuva.org
Post Reply