Page 1 of 1

Sample code on IM site fails

Posted: 2007-07-26T00:20:48-07:00
by sol90
Hi there,

In trying the following code, I get an "unable to parse 'aa' error".

convert -size 100x100 xc: -fx 'aa=atan2(j-h/2+.5,i-w/2+.5)/pi/2; aa>0 ? aa : aa+1' hue_angular.png
convert -size 100x100 xc: -fx 'xx=i/w-.5; yy=j/h-.5; rr=sqrt(xx*xx+yy*yy); rr*2' luminence_radial.png

Can someone please post the correct code that will work?

Thanks!

Re: Sample code on IM site fails

Posted: 2007-07-26T07:02:00-07:00
by magick
You may need to upgrade your version of ImageMagick. The command lines work fine for us. Recent versions of ImageMagick permit assignments in the -fx argument (e.g. aa=atan2...).

Re: Sample code on IM site fails

Posted: 2007-07-26T08:23:55-07:00
by sol90
What version exactly are you using?
I have the most recent version.

ImageMagick-6.3.5-3-Q16-windows-dll.exe
from http://www.imagemagick.org/script/binar ... hp#windows


If it helps, I'm on Windows XP typing in from command window.

Re: Sample code on IM site fails

Posted: 2007-07-26T08:29:01-07:00
by magick
We're using 6.3.5-3 as well. Perhaps under Windows you need to use double quotes rather than single quotes.

Re: Sample code on IM site fails

Posted: 2007-07-26T08:32:03-07:00
by sol90
magick wrote:We're using 6.3.5-3 as well. Perhaps under Windows you need to use double quotes rather than single quotes.
That did the trick. Thank you.