GMIC CLI Montage Commands Between Versions

I started using G’Mic’s CLI program before version 2.0. I used the following command to create a montage:

gmic *jpg -gimp_montage 4,\""V(H(0,1),H(2,V(3,4)))"\",1,1.0,0,5,0,0,0,255,0,0,0,0,0 -o output."$(date)".jpg,75

This no longer works since some version since 2.0, so I found the following command, which does work:

gmic *.jpg -montage "X",3,0 -o output.jpg

The problem I’m having is that I don’t know how to add padding to the new command, so that there’s space between each image in the montage.

The older command had 13 values between commas representing different options:

1,1.0,0,5,0,0,0,255,0,0,0,0,0

And the 3rd placement controlled padding. Is there a way with the newer version of G’Mic CLI to access these various options?

Read the docs: https://gmic.eu/reference.shtml#montage. I will paste it for your convenience.

I rarely use it because I don’t find it intuitive and I can do better. Notice at the end there is a “_processing command”. I think that it is a catch-all. If you want to create padding you could do it there.

Thanks for the reply, but I was looking for someone to give me a command that will work. The documentation is too advanced for low to average IQ people to understand. The people who created G’Mic have IQs over 130, probably. I’d like a G’Mic for Dummies manual.

BTW, you say you can create montages better. What do you use?

I would look into the .gmic file, and then you can see which values goes by which. $n corresponds with the gui or cli parameters. It taken me a long time to learn about G’MIC coding, so, but questions still remains. Like, I want to do hilbert curves or pixel art scaling, but I lost the page which is relevant to those mathematics.

The solution is easier than you think. Change -gimp_montage to fx_montage. Try

gmic sample tiger,flower,cat,dog,wall,david fx_montage 4,\""V(H(0,1),H(2,V(3,4)))"\",1,1.0,0,5,0,0,0,255,0,0,0,0,0

BTW, it is the fourth parameter that controls the padding.

Thank you afre!

So I tested gmic *jpg -fx_montage 4,\""V(H(0,1),H(2,V(3,4)))"\",1,1.0,0,5,0,0,0,255,0,0,0,0,0 -o output."$(date)".jpg and it works fine. Just the simple replacement of -gimp_montage with -fx_montage, as you say. I wonder what version this changed, because in earlier versions it was -gimp_montage.

Good idea reptorian! I also remember when I first started using G’Mic years ago that I could run it through GIMP in verbose mode to see what was happening. I forgot to try that.

@David_Tschumperle The nesting with the parentheses in the GUI version is easier to parse than the CLI one with its colons. I had to stare at the CLI example for a long time before I sort of got it.