-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
53 lines (39 loc) · 2.51 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Copyright 2012, Robert Bieber
This is a set of scripts I'm building to automate a mass portrait shoot with
QR codes. The basic idea is that I'll first generate a bunch of small cards,
each with a unique number and a QR code corresponding to that number. I'll then
hand the cards to each successive client, taking a single photograph clearly
showing the QR code before beginning their session. Afterwards, after doing a
batch RAW conversion on the images I'll split them up into directories using
the QR code images, and then dump them onto a web server with a small PHP
script to display them to clients.
Each step of this process will be handled by a separate script, and I'll
document them here as I go along. The scripts themselves are found in the
scripts/ directory.
gencards.py - Generates a PDF file containing the desired number of number/QR
cards. Usage is simply:
gencards.py <number of cards> <output file>
The layout of the cards is fully customizable, but configuration is done through
constants in the script itself. You'll find all the relevant settings towards
the top of gencardYs.py under the section "User Parameters." An example of a set
of cards generated with the default settings is included in
examples/examplecards.pdf.
This script requires python, the reportlab PDF generation library for Python,
and the qrencode command.
sortphotos.py - Sorts photos into directories corresponding to their serial
number, doing RAW conversion along the way if necessary. Usage is
sortphotos.py <input directory> <output directory>
Photos will be copied into the output directory in subdirectories named with the
code that preceded each photo. The input directory will be recursively
scanned for photographs, and if there are RAW files then they will be converted
using the .ufraw file found most recently in the directory tree.
This script requires ZBar, ImageMagick and UFRaw (if converting RAW files).
genthumbs.py - Generates thumbnails for a sorted set of photos. Usage is
genthumbs.py <input directory> <width> <height>
Thumbnails will be generated such that width x height is the maximum size. This
script generates thumbnails named to match the web viewer's expectations. It's
generally a good idea to use this script to generate thumbnails rather than
letting the web viewer do it, because they're better quality this way and
thumbnail generation can seriously slow down the web viewer, potentially
running you up against PHP's time and memory limits as well.
This script requires ImageMagick.