In G’MIC, v2.9.0, I’m trying to build up a string variable in a “for()” loop within an expression. I can do this at the command level, but not in an expression.
gmic_reference_290.pdf suggests the “string()” function, but I can’t get it to work. I simplify my command:
f:\web\im>%GMIC% eval "string ('zxc')" [gmic]-0./ Start G'MIC interpreter. [gmic]-0./ Evaluate expression 'string ('zxc')' and assign it to status. [gmic]-0./ *** Error *** Command 'eval': Unrecognized function call 'string( 'zxc')' in expression 'string( 'zxc')'.
updata290.gmic contains a command that uses “string()”, and its usage seems consistent with mine. What happens when I run that command? It seems to be broken:
f:\web\im>%GMIC% toes.png percentile ,12,16 [gmic]-0./ Start G'MIC interpreter. [gmic]-0./ Input file 'toes.png' at position 0 (1 image 267x233x1x3). [gmic]-1./ Apply percentile averaging filter to image , with mask , min percentile 12% and max percentile 16%. [gmic] *** Error in ./percentile/ *** Command 'eval': Unrecognized function call 'string('N[',p,']=j(',x - w2,',',y - h2,');')' in expression '...t = string('N[',p,']=j(',x - w2,',',y - h2,');')...'.
I’m a G’MIC newbie, so I expect I’m doing something wrong. So my questions are:
How should I use “string()”?
Is there a better way to concatenate strings?
EDIT: I should add, I’m on Windows 8.1.