Sample code on IM site fails

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
sol90

Sample code on IM site fails

Post 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!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Sample code on IM site fails

Post 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...).
sol90

Re: Sample code on IM site fails

Post 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.
Last edited by sol90 on 2007-07-26T08:29:10-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Sample code on IM site fails

Post by magick »

We're using 6.3.5-3 as well. Perhaps under Windows you need to use double quotes rather than single quotes.
sol90

Re: Sample code on IM site fails

Post 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.
Post Reply