Skip to content

Instantly share code, notes, and snippets.

@Birchwell
Last active February 8, 2019 10:42
Show Gist options
  • Save Birchwell/8065b4561c98c5a8a5cf to your computer and use it in GitHub Desktop.
Save Birchwell/8065b4561c98c5a8a5cf to your computer and use it in GitHub Desktop.
This G'Mic script will go through a folder of many images and output multiple montages in the working folder. The script can be modified to customize the number of images to turn into individual montages by changing the "4" in "(expr $c % 4)" to whatever number desired. Can be used with Thunar Custom Actions.
#!/bin/bash
c=0
for i in *.jpg; do
c=$(($c+1))
f="$f $i"
test "$(expr $c % 4)" != 0 && continue
gmic $f -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-$c.jpg
f=""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment