ImageMagick
Date: 07/29/06
(PHP Community) Keywords: php, web
Hello,
I currently use Gallery, but would like to go back to a "hand-made" photo gallery web application. Instead of processing the images on my computer and uploading them to my server (which I did in the past), I'd like to use something like ImageMagick to create the thumbnails, etc.
I know that Gallery uses ImageMagick, and it doesn't have any issues making thumbnails currently, so I know it's there somewhere. I'm not very familiar with how it works, and I tried to write some code based on what I saw online (please take into account that I am only slightly above the novice stage of using php, so excuse any stupid errors I may have made):
$resize="-resize 600";
$convert="convert " . $resize . " " . $input_file . " " . $output_file;
exec($convert);
?>
So that $convert looks like: convert -resize 600 cow.jpg cow.jpg
What I ideally want is to resize the image down to 600px as the widest edge, do an unsharp mask, and save it into an album directory. Then I want to create a 150px thumbnail, do an unsharp mask, and save it into a subdirectory within the album folder.
Right now I'm not getting any error messages, and I'm not getting an altered image. I'm not getting anything, and I'm not sure what I'm doing wrong. (I tried messing around with folder permissions and stuff but nothing worked.)
And here's a link to my phpinfo page just in case you need this for more information.
Any help would be greatly appreciated. Thanks in advance!
-AJ
Source: http://community.livejournal.com/php/477948.html