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 not found

Hi,

i have a little problem again, this time with imagick:

Fatal error: Class 'Vokuro\Controllers\Phalcon\Image\Adapter\Imagick' not found in 

I use the code from the example:

<?php
  $image = new Phalcon\Image\Adapter\Imagick("upload/test.jpg");
  $image->resize(200, 200)->rotate(90)->crop(100, 100);
   if ($image->save()) {
      echo 'success';
   }

Path ImageMagick:

C:\Program Files\ImageMagick-6.8.8-Q16;

Imagick:

imagick module  enabled

php.ini:

extension=php_imagick.dll
extension=php_phalcon.dll

Thx again :-)

Hey, try:

phpinfo();
exit;

Can you see info about imagick here?



60.0k

Hi Nikolay,

thx for reply, yes it is there.

If i check my extensions outside phalcon, it returns an array of gd and imagick, but not inside phalconphp.

            if(extension_loaded('gd')) {
              print_r(gd_info());
           }
         else {
            echo 'GD is not available.';
           }

      if(extension_loaded('imagick')) {
         $imagick = new Imagick();
        print_r($imagick->queryFormats());
      }
       else {
         echo 'ImageMagick is not available.';
    }

Rgds

Stefan



85.5k
Accepted
answer
edited Dec '15

new \Phalcon\Image\Adapter\Imagick not just Phalcon\Image\Adapter\Imagick


new \Phalcon\Image\Adapter\Imagick("upload/test.jpg");


60.0k

Hi Izo,

it is working now, unbelievable :-)

Rgds

Stefan