command line problem, please help me to check my code.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Post by Bonzo »

Either of these will work:

Code: Select all

exec('usr/local/bin/convert 3.jpg -crop 20x20+4+4 test/2.jpg'); 

exec("$convert 3.jpg -crop 20x20+4+4 test/2.jpg"); 
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Post by Bonzo »

Couple of other things I would try:

Code: Select all

<?php 

$convert = "/usr/local/bin/convert"; 

$new_image = "test/2.jpg";

exec("$convert 3.jpg -crop 20x20+4+4 $new_image"); 

?> 
Try saving to the same folder to see if that works using 2.jpg rather than test/2.jpg

You can use -debug in the code and see if that outputs any messages but for some reason that never works for me.
Post Reply