Posted By

metoikos on 06/22/10


Tagged

php resize image square wideimage


Versions (?)

aspect ratio friendly square image resize


 / Published in: PHP
 

  1. $line = $file->getWidth() > $file->getHeight() ? $file->getHeight() : $file->getWidth();
  2. $file->crop('center', 'center', $line, $line)->resize($size[0], $size[1])->saveToFile($save_paths[$key]);

Report this snippet  

You need to login to post a comment.