photofit

The majority of digital cameras take pictures in one of two aspect ratios - 4:3 (Olympus, Panasonic, and Leica DSLRs and most compact digital cameras) or 3:2 (DSLRs based on the 35mm film standard, e.g. Canon, Nikon, and Pentax).

However, most of the common paper sizes (A4, 10x8, 7x5, etc) have different aspect ratios, so when pictures are printed some cropping will occur.

The photofit script compares the aspect ratios of a given image file and paper size, and adds white borders to the image so that it will be printed at the maximum size without any cropping.

Download

Usage

photofit.pl [options] --paper-size <paper_size> <source_file> <destination_file>

Description
Adds white borders to source_file so that it becomes the same aspect ratio as paper_size, then saves the resulting image as destination_file. This image can then be printed without any extra cropping being applied by the printer.

Options

  • --border size
    Adds a border around the complete image. The border size must be specified with units, e.g. "10mm".

Dependencies
Requires the non-core Perl modules Image::Size, Image::Magick, and Paper::Specs

Copyright and License
Copyright © 2005-2008 Jon Allen.
This software is licensed under the terms of the Artistic License version 2.0.