PHP - WideImage class cropping
Posted
by
Kolind
on Stack Overflow
See other posts from Stack Overflow
or by Kolind
Published on 2012-09-25T09:36:32Z
Indexed on
2012/09/25
9:37 UTC
Read the original article
Hit count: 218
php
I am trying to crop a large image to make thumbnails. But I can't get WideImage to save the file. I've tried the following:
1st method:
$img = WideImage::load('../files/' . $file_name)->crop('center', 'center', 200, 200);
$img->saveToFile('../files/thumb/thumb_' . $file_name);
2nd method:
$img = WideImage::load('../files/' . $file_name)->crop('center', 'center', 200, 200);
$img->copy('../files/thumb/thumb_' . $file_name);
But nothing seems to happen, when I am performing any of these methods. I am getting no errors and no thumbnails.
Am I doing something wrong here?
© Stack Overflow or respective owner