hello
I’m trying to find out how I could print the min,max,mean values of a picture.
I have a script (Perl) where I would like to send a gmic command and continue doing things with these values
something like
gmic ima.1.png ima.2.png sub abs e {mean value,max value etc…} -o tmp.png
This is a way to represent a vector of numbers in the G’MIC math parser (so between {}). A math expression returning a vector is substituted by a string where all those numbers are separated by commas.
It is basically the same as writing {ia},{im},{iM}, but this latter form invokes 3x time the math evaluator so is probably a bit slower to run (and longer to write ).
Foe echo_stdout no, it has no difference with or without selections (echo_stdout does nothing with the selected images by the way).
For echo, this is a bit different, as specifying a [selection] for this particular command is not related to the images, but to the command scope that is also echo-ed. echo[] string tells G’MIC to write only the specified string on stderr and nothing else.
Could you please elaborate a bit more? I know how to redirect but I don’t know much about stdout and stderr and what you mean by scope. A few examples would help (if you have the time ).