This is an old revision of the document!
Unixscripts-Photos
These are useful in manipulating photos (jpegs). They depend on my library argp.sh(1) - see Unix Scripts - and these external packages are required jhead(1), jpgtrans(1), netpbm-progs (pnmscale(1)), libjpeg (djpeg(1), cjpeg(1))
erect-jpeg
erect-jpeg - rotate a photo so that it displays correctly by examining the Orientation Exim information in the file. Uses xargs(1) to parallelise operations to as many CPUs as it can find.
label-photos
label-photos - view *.jpg files and prompts for a label for each, putting the label into the Exif comment field. It also recurses through any directories called zoom
, applying the same label to photos of the same name.
rename-jpeg-by-date
rename-jpeg-by-date - renames jpg files according to the date reported by jhead
resize-jpeg
resize-jpeg - size a jpeg so that the longest side is the required number of pixels and the other side is scaled.
shrink-jpeg
shrink-jpeg - passes photos through djpeg(1) and cjpeg(1) which can result in a size reduction of about 50% without compromising much on quality. The amount of shrinkage depends on the camera, of course.