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])
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s