It is currently Mon Aug 17, 2026 6:22 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: G'Mic CLI Montage command
PostPosted: Sun Dec 02, 2018 11:09 pm  (#1) 
Offline
GimpChat Member

Joined: Mar 01, 2015
Posts: 17
I've used the G'Mic CLI Montage command for some years and love it. I wrote a tutorial a few years ago on how to use the command with Thunar Custom Actions.

But I've recently started using it again and the old command

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


no longer works. I found this command does work:

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


And as a bash command:

#!/bin/bash

c=0
for i in *.jpg; do
  c=$(($c+1))
  f="$f $i"
  test "$(expr $c % 9)" != 0 && continue
  gmic $f -montage "X",3,0 -o output-$c.jpg
  f=""
done


The older command would create a montage while giving each image similar dimensions, e.g.:

Image

The new command, however, will make some images much smaller and other images larger, e.g.:

Image

What can I modify or add to the new command to make each image in the montage share the same dimensions?


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: G'Mic CLI Montage command
PostPosted: Mon Dec 03, 2018 6:37 am  (#2) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 8457
Location: On the other side of your screen
Usually depends on the type and mode
If your pictures are all different sizes and you pick align mode they will stay different sizes.
If you pick scale mode they will scale to the same size

_________________
Image
Free Fun Photo Editing & resources
Poems from the Lord
Gimp Newby
Gimp version 3.2.4 and GMIC-Qt 4.0.2 OS :- Windows 10 Home 64


Top
 Post subject: Re: G'Mic CLI Montage command
PostPosted: Mon Dec 03, 2018 8:02 am  (#3) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2612
Sometimes easier to get a layout up and running in Gimp then translate to the gmic command

This for 2 wide by 3 deep V(V(H(0,1),H(2,3))),H(4,5)) which equates to 'VVH0:1H2:3H4:5'

And what is the gimp default as a command, 3 wide x 2 deep H(H((V(0,1),V(2,3))),V(4,5)) is 'HHV0:1V2:3V4:5'

but the more groups the more obscure it becomes ;) best of luck

A bit of experiment getting each tile the same size. No joy with that. I think this should scale to 400 wide but then montage takes over and fits in depending on landscape/portrait proportions anyway. However it does make a smaller image. For 2x3 layout

./gmic *.jpg -fx_scaledown3 0,1,0.99,1,400,16,0,2.27,1,3,0 -montage 'VVH0:1H2:3H4:5',3,0 -o output.png


Gmic is a bit short of a general scaling filter (at least I can not find one) I would use ImageMagick in your bash file prior to gmic.


Top
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group