[magick-users] Distort variables in a Function

linda fasciano lindafasciano at hotmail.com
Sat Nov 1 15:23:26 PDT 2008


Thanks Fred, that worked perfectly.  Now is there a way to make the images temporary so that only the final montage will be output into my directory?
 
http://www.lingolinda.com/2008/scripts/IM/gradangleDist2.txt
 
http://www.lingolinda.com/2008/scripts/IM/gradangleDist2.php
 
> ------------------------------> > Message: 2> Date: Sat, 1 Nov 2008 17:45:10 +0000> From: linda fasciano <lindafasciano at hotmail.com>> Subject: [magick-users] Distort variables in a function> To: <magick-users at imagemagick.org>> Message-ID: <BAY103-W34CCC4122991D78E83BE8CBF230 at phx.gbl>> Content-Type: text/plain; charset="iso-8859-1"> > > 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 > > ------------------------------> > Message: 3> Date: Sat, 1 Nov 2008 11:00:01 -0700> From: Fred Weinhaus <fmw at alink.net>> Subject: Re: [magick-users] Distort variables in a function> To: magick-users at imagemagick.org> Message-ID: <p06240800c532484d2a06@[192.168.1.2]>> Content-Type: text/plain; charset="us-ascii" ; format="flowed"> > 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> Magick-users at imagemagick.org> http://studio.imagemagick.org/mailman/listinfo/magick-users> > > End of Magick-users Digest, Vol 70, Issue 1> *******************************************


More information about the Magick-users mailing list