Page 1 of 1

imagick_resize function does not exist

Posted: 2008-02-02T00:15:49-07:00
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

Re: imagick_resize function does not exist

Posted: 2008-02-02T08:32:55-07:00
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.

Re: imagick_resize function does not exist

Posted: 2008-02-02T08:55:48-07:00
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

Re: imagick_resize function does not exist

Posted: 2008-02-03T12:19:38-07:00
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.