Page 1 of 1

possible bug MAGICK_PRECISION=9

Posted: 2011-03-08T14:37:39-07:00
by fmw42
IM 6.6.8.1 Q16 Mac OSX Tiger.

I was trying to set the precision of fx calculations to 9 significant figures (default seems to be 6) in one of my scripts, but it does not seem to have any effect. Is this still available or am I making a mistake in its use. I was trying to avoid having to put -precision 9 in each fx command line.

I just set MAGICK_PRECISION=9 near the top of my script in the defaults arguments.


Here is a simple test script:

#!/bin/bash

MAGICK_PRECISION=9

pi=`convert xc: -format "%[fx:pi]" info:`
echo $pi

result:
3.14159


Whereas this works:

#!/bin/bash

pi=`convert xc: -precision 9 -format "%[fx:pi]" info:`
echo $pi

results: 3.14159265


Thanks

Fred

Re: possible bug MAGICK_PRECISION=9

Posted: 2011-03-08T16:38:11-07:00
by el_supremo
Hi Fred,
Maybe you need to export MAGICK_PRECISION so that child processes such as convert will inherit the value.

Pete

Re: possible bug MAGICK_PRECISION=9

Posted: 2011-03-08T16:40:07-07:00
by fmw42
Pete,

Thanks. That works.

Fred