I am trying to run a bash script on my web site hosted by Godaddy using PHP and exec command, but I find that their version of IM at 6.2.7.9 is so old that many things do not work. For example a simple fx calculation fails to return anything, such as
RRV=`/usr/local/bin/convert xc: -format "%[fx:255*$RR/$qr]" info:`
or even
qrange=`/usr/local/bin/convert xc: -format "%[fx:quantumrange]" info:`
Furthermore, they do not even have the unix function bc available to replace the fx calculation.
I am trying to get Godaddy to upgrade their IM and make bc avialable, but don't know whether they will do it or not, yet. I suppose I will have to rewrite my bash script using mostly PHP calculations.
Nevertheless, I am curious. Can anyone tell me when fx calculations were first introduced into IM. I checked the changelog, but it does not go back further than 6.3.1.6?
Thanks
when were fx calculations first available?
Re: when were fx calculations first available?
You can always check legacy releases at http://sourceforge.net/projects/imagemagick/ but even then, -fx was enhanced substantially over time meaning that early versions of the -fx option may not support your expressions.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: when were fx calculations first available?
From FX Espressions...
http://www.imagemagick.org/Usage/transform/#fx_escapes
in size! Current change log is now 94Kb!
http://www.imagemagick.org/Usage/transform/#fx_escapes
I grabbed and kept a copy of the change log from before that version - it is 80KbAs of IM version 6.2.10 you can now use FX Expressions within Image Property Escaped strings such as used by "-format" and "-annotate" arguments.
in size! Current change log is now 94Kb!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: when were fx calculations first available?
Thanks. But seems that my ISP is only providing IM 6.2.6-9. So I am out of luck on doing much on Godaddy with running exec in PHP to run IM commands. And they don't provide bc either. So I am having to rewrite my whole script mostly in PHP to all the math calculations.
I cannot get quantumrange. So I have to use the Q value and an if statement. Do you know what the quantumrange is for Q32.
Also txt: does not print out the hex value in that old release, so I have to compute it from the rgb values.
I cannot get quantumrange. So I have to use the Q value and an if statement. Do you know what the quantumrange is for Q32.
Also txt: does not print out the hex value in that old release, so I have to compute it from the rgb values.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: when were fx calculations first available?
Q32 -> QuantumRange = 2^32-1
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/