request enhancement to -evaluate log IM 6.8.1.3 Q16

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

request enhancement to -evaluate log IM 6.8.1.3 Q16

Post by fmw42 »

IM 6.8.1.3 Q16 Mac OSX Snow Leopard

When convenient, would it be possible to fix -evaluate so that it recognizes scientific notation for values.

In my script, spectrum, I compute an argument that may be larger than 1000000 (1 million) using %[fx:...] and it generates a value in scientific notation for anything above 1 million, such as 1e+8. But -evaluate log 1e+8 errors regarding the scientific notation. I tried adding -precision 10 in the fx computation, but it did no good, as I expect it only controls the fractional part of the number.

If there is a setting that I can use already to make %[fx:...] not use scientific notation, please let me know and I will modify my script appropriately.

Thanks

Fred
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: request enhancement to -evaluate log IM 6.8.1.3 Q16

Post by magick »

Look for a patch in ImageMagick 6.8.1-4 Beta by sometime tomorrow. Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: request enhancement to -evaluate log IM 6.8.1.3 Q16

Post by fmw42 »

magick wrote:Look for a patch in ImageMagick 6.8.1-4 Beta by sometime tomorrow. Thanks.

I just downloaded and installed 6.8.1-4 Q16 Mac OSX Snow Leopard.

Perhaps the patch did not make it into the release, otherwise, I think there is a bug.

This works:

Image

convert square31.png -fft +delete -auto-level -evaluate log 100000000 miff:- | convert - show:

But this fails:

convert square31.png -fft +delete -auto-level -evaluate log 1e+8 miff:- | convert - show:

convert: invalid argument for option `-evaluate': 1e+8 @ error/convert.c/ConvertImageCommand/1406.
convert: no decode delegate for this image format `/var/tmp/magick-53191DuaSjmhuFsyA' @ error/constitute.c/ReadImage/550.
convert: no images defined `show:' @ error/convert.c/ConvertImageCommand/3066.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: request enhancement to -evaluate log IM 6.8.1.3 Q16

Post by fmw42 »

Thanks. It works correctly now in IM 6.8.1.5 Q16 Mac OSX Snow Leopard
Post Reply