possible bug MAGICK_PRECISION=9

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug MAGICK_PRECISION=9

Post 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
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: possible bug MAGICK_PRECISION=9

Post by el_supremo »

Hi Fred,
Maybe you need to export MAGICK_PRECISION so that child processes such as convert will inherit the value.

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug MAGICK_PRECISION=9

Post by fmw42 »

Pete,

Thanks. That works.

Fred
Post Reply