We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Imagick set image filters

Hi,

i am trying to set an imagick filter like this:

   $image = new \ Phalcon\Image\Adapter\Imagick("img/lambo.jpg");
         $image->resizeImage(640, 480, imagick::FILTER_LANCZOS, 0.9);
         if ($image->save()) {
             echo 'success';
     }

I get this error message:

Fatal error: Call to undefined method Phalcon\Image\Adapter\Imagick::resizeImage() in /Users/stefan/Sites/vokuro/app/controllers/IndexController.php on line 19

Can i not use the standard imagick functions?

Rgds

Stefan

use Phalcon\Image\Adapter\GD; library instead

Example: $image = new Gd("fle.jpg"); $image->resize('width','height',''); $image->save("flelocation"); return $image;