Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

How to generate a filmstrip image in python from a folder of images

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.56 KB  |  views: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/usr/bin/env python
  2.  
  3. import os, os.path
  4. from contactsheet import make_contact_sheet
  5.  
  6. def make_film_strip(fnames,
  7.                    (photow,photoh),
  8.                    (marl,mart,marr,marb),
  9.                    padding):
  10.     return make_contact_sheet(fnames,
  11.                               (1, len(fnames)),
  12.                               (photow,photoh),
  13.                               (marl,mart,marr,marb),
  14.                               padding)
  15.        
  16. fstrip = filmstrip.make_film_strip(filmstrip.fnames, (120, 120), (0,0,0,0), 0)
  17. fstrip.save('/path/to/file.format')