Skip to main content

Fit your photos into canvases for printing

Project description


A CLI app to fit your photos into canvases for printing.

More information in


You can install PhotoFitter using pip or manually, if you prefer.

Using pip

Simply request pip to install photofitter.

  $ pip install photofitter


Clone PhotoFitter's repo and run the code.

  $ git clone
  $ cd photofitter
  $ python install


PhotoFitter includes a help command, simply type:

$ photofitter -h

You will get the full list of commands, as so:

usage: photofitter [-h] [-V] [-d DIMENSIONS] [-s SUBDIVISIONS] [-p PIXELS]
                   [-f FOLDER] [-l] [-B BACKGROUND_COLOR] [-L LINE_COLOR]
                   [-T LINE_THICKNESS] [-R] [-o OUTPUT] [-n NAME]
                   [-t STARTFROM] [-r REGEX] [-P]

This program will fit your photos into canvases for printing, and then
cutting. This script will take the images from the folder specified and fit
them into the specified dimensions, so that the images are as big as possible.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program version
  -d DIMENSIONS, --dimensions DIMENSIONS
                        dimensions of canvas to fit images, in
                        {width}x{height} mm [150x100 by default]
                        subdivisions of canvas, in {columns}x{rows} [2x1 by
  -p PIXELS, --pixels PIXELS
                        pixels for each mm [20 by default]
  -f FOLDER, --folder FOLDER
                        insert folder location [. by default]
  -l, --lines           show subdivision lines [not by default]
                        background color of image, in HTML [ffffff by default]
  -L LINE_COLOR, --line-color LINE_COLOR
                        color of lines, in HTML [000000 by default]
                        thickness of lines, in px [2 by default]
  -R, --recursive       iterate folder recursively [non-recursive search by
  -o OUTPUT, --output OUTPUT
                        location of output folder [./output by default]
  -n NAME, --name NAME  output name prepended to every image [fitter by
  -t STARTFROM, --startfrom STARTFROM
                        number to start output filename with [0 by default]
  -r REGEX, --regex REGEX
                        regular expression: only files matching the regular
                        expression will be parsed [.* by default]
  -P, --print-params    print parameters

Here are more detailed explanations on each of the commands:

Command name Directive Description
Help -h, --help Receive help about how to use PhotoFitter. Overrides all commands
Version -V, --version Version information
Canvas dimensions -d DIMENSIONS, --dimensions DIMENSIONS Dimensions, in mm, of the canvas in which the photos will be rendered. All the photos rendered will have these dimensions. DIMENSIONS must be in the format {width}x{height}. By default, dimensions are 150x100.
Subdivisions -s SUBDIVISIONS, --subdivisions SUBDIVISIONS Number of subdivisions of canvas in which the photos will be fit. SUBDIVISIONS must be in the format {columns}x{rows}. By default, subdivisions are 2x1.
Resolution -p PIXELS, --pixels PIXELS Specifies the image resolution, in pixels per mm. By default, resolution is 20.
Folder -f FOLDER, --folder FOLDER Folder route to retrieve images. Route can be relative or absolute. By default, route is .
Show lines -l, --lines Show lines in subdivisions
Background color -B BACKGROUND_COLOR, --background-color BACKGROUND_COLOR Background color of canvases. BACKGROUND_COLOR must be a color in hex form, six characters. By default, background color is FFFFFF.
Line color -L LINE_COLOR, --line-color LINE_COLOR Line color for subdivisions (see show lines). LINE_COLOR must be a color in hex form, six characters. By default, line color is 000000.
Recursive iterating -R, --recursive Iterate images in folder recursively.
Output foler -o OUTPUT, --output OUTPUT Route to export images, can be absolute or relative. If folder does not exist, it will be generated.
Output name -n NAME, --name NAME Rendered filenames will be of the format {NAME}_{NUMBER}.jpg. By default, output name is fitter.
Output start number -t STARTFROM, --startfrom STARTFROM Rendered filenames will be of the format {NAME}_{NUMBER}.jpg, with NUMBER being STARTFROM + INDEX, with INDEX being the number of picture generated, starting from 0 and incrementing by 1. By default, output start number is 0.
Regex -r REGEX, --regex REGEX Only files matching the regular expression REGEX will be parsed. By default, regex is .* (all files)
Print parameters -P, --print-params Print dict of parameters

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

photofitter-1.0.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

photofitter-1.0.1-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page