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

Phalcon Image Resize

I don't know why but Phalcon\Image\Resize returns a pixelated image for example when you pass from 300x300 to 80x80

Maybe the function is using imagecopyresized instead of imagecopyresampled



85.5k

https://github.com/phalcon/cphalcon/blob/master/phalcon/image/adapter/gd.zep#L146

i would never use framework functions to handle my images. I always "fix" them myself

edited Feb '17

Hi, my way works fine

<?php
 $img = new \Phalcon\Image\Adapter\Imagick($path_max);

   $img->resize(null, 550, \Phalcon\Image::HEIGHT)->crop(366, 550); //550 px heigth
    if($img->save($path_mini, 100))
          {
              //ok
          }
     else
         {
               //error
         }

Don't forget to install Imagick

Source