Page 1 of 1

Imagemagick trouble - oh no! please help

Posted: Thu Sep 03, 2009 12:51 pm
by handell
Ive been looking at Imagemagick as a solution to our virtual design process at my company.
The problem I have is that half the functions do not return a result.
Can anyone tell me why?

example code that does not work:

Code: Select all

<?php
$image="orig_image.jpg";
$output = "output_image.png";
 
exec("convert -size 500x500 xc:  -channel G \
          -fx 'sc=.15; (i/w-.5)/(1+sc*cos(j*pi*2/h)-sc)+.5' \
          -separate  map_hourglass.png
          
          convert $image -matte -bordercolor none -border 1x0  map_hourglass.png \
          -channel RGBA   -fx 'p{ v.p{i*v.w/w,j*v.h/h}.g*w, j}' \
          -shave 1x0  $output ");
 
echo "<br><img src=\"". $output ."\"><br>";
?>