Create thumbnail images of a set of pictures

Load 4 pictures in a row from the input directory and create a thumbnail image:

#!/usr/bin/env python3

import glob
import subprocess

inputs = glob.glob('input/*.JPG')

cpt = 0
while len(inputs) > 0:
to_process = inputs[:4] + ['logo:', 'logo:', 'logo:']
inputs = inputs[4:]
cpt += 1
subprocess.call(["montage"] + to_process[:4] + ["-geometry", "800x600+2+2", "final/final_%02d.jpg" % cpt])