Set up PHP variables for the size parameters

$width="150"
$height="150"

Then calculate the individual point x,y values that you want to use 
as fractions of width and height

$ix1="..."
$iy1="..."
$ox1="..."
$oy1="..."

etch

  and then put those variables inside your


$ILLUSTRATE="-distort Perspective \"$ix1,$iy1,$ox1,$oy1 ..... \" ";


I am not too sure about the quoting in PHP, so you will have to deal 
with that so that your variables get properly parsed.





>How do I write the Perspective variables so that it can be made into 
>a function where all I would have to change are the size variables 
>and have it automatically adjust to any size?  I tried looking at 
>the -fx codes but everything I tried did not work.  Also is there a 
>way to discard the temporary images used in the montage.
>http://www.lingolinda.com/2008/scripts/IM/gradangleDist.txt
>
>http://www.lingolinda.com/2008/scripts/IM/gradangleDist.php
>
>Thanks, LInda
>LingoLinda.com 
>
>
>
>
>
><?
>$IN="-size 150x150 gradient:white-black";
>$OUT1="temp/gradangle1.png";
>$OUT2="temp/gradangle2.png";
>$OUT3="temp/gradangle3.png";
>$OUT4="temp/gradangle4.png";
>$ILLUSTRATE="-distort Perspective '0,0,0,30 0,120,30,150 
>150,50,150,0 150,150,150,30' ";
>
>exec ("/usr/bin/convert $IN $ILLUSTRATE $OUT4");
>exec ("/usr/bin/convert $OUT4 -flop $OUT3");
>exec ("/usr/bin/convert $OUT4 -flop -flip $OUT1");
>exec ("/usr/bin/convert $OUT4 -flip $OUT2");
>exec ("/usr/bin/montage -background black $OUT1 $OUT2 $OUT3 $OUT4 
>-tile 2X2 -geometry +0+0 temp/G140.png");
>
>print "<a href=temp/G140.png><img src=temp/G140.png></a><br>";
>?>
>
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to