PDA

View Full Version : Imagemagick Instructions



rpflo
04-28-2009, 09:50 AM
I was troubled while trying to get imagemagick to work. Found some old threads but nothing in them seemed to work.

So here it is for anybody looking for help:

1) Stick test.jpg in your public_html folder
2) Stick a php file (lets say imagemagick.php) in public_html. You can copy and paste this php code and drop it in the body of your html.
3) Replace {username} with your username. It's the user name with which you log in to your ftp (first 8 characters of your domain name).



<?php

$exec="/usr/bin/convert /home/{username}/public_html/test.jpg -resize 190x100 -quality 80 /home/{username}/public_html/test.jpg";
system($exec);

?>

<br/>
<img src="test.jpg" />


You have to put the path relative to the server, not relative the website being used. That's why there's all that /home/username/public_html stuff.

Cheers! :D

intromaster
08-19-2009, 08:13 AM
thanks for this! I was looking for something like this for almost 4 months!!!

IntroMaster