I have two images A and B. I would like to use the autocrop coordinate values of A to then crop B. How to do it? I was under the impression that autocrop sends its bounding box coordinates to ${} but I am wrong.
autocrop_coords:
value1,value2,... | auto
Return coordinates (x0,y0,z0,x1,y1,z1) of the autocrop that could be performed on the latest
of the selected images.
Default value: 'auto'
which actually does not autocrop your image, but return the autocrop coordinates that would be used to crop the image.
Like this:
One step further: how do I get the individual coordinate values of ${}? I need to manipulate them in order to expand the autocrop region. So, if (x0,y0,z0,x1,y1,z1) is the autocrop region, I want then now to use (x0-u0,y0-v0,z0-w0,x1+u0,y1+v0,z1+w0) to crop the image.
writing it directly on the command line works, but is much more complicated, as you have to be careful to backslash the special characters in bash, so, that’s a bit painsome:
[gmic]./ Start G’MIC interpreter (v.3.4.2).
[gmic]./ Input black image at position 0 (1 image 400x400x1x1).
[gmic]./ Draw filled circle at (50%,50%) with radius 100 on image [0], with opacity 1 and color (1,0).
[gmic]./ Set local variable ‘border=10’.
[gmic] *** Error in ./*substitute/autocrop_coords/_autocrop0/ *** Unknown command or filename ‘xy’; did you mean ‘x’?`