Skip to main content

Concat photos together in a matrix

Project description

Overview

Simple command-line application which concatenates a list of photos into a single photo showing them in a matrix (in other words, a grid).

Installation

First of all, you need Python 3.7 or greater installed in your system.

Then, as photomatrix is a command line application, open a terminal and be ready to type commands.

Install automatically with pip

photomatrix is available from the Python Package Index (PyPI), so installable with pip:

pip3 install photomatrix

You should now have photomatrix available in your shell. For example, print the command help:

photomatrix -h

Build locally

Alternatively, you can build locally from source code. First, clone this project from Github.

Cd into the root folder.

Create a virtual environment (e.g. named my_env) and activate it:

python3 -m venv my_venv
source my_venv/bin/activate

Install the dev dependencies and the app dependencies into the virtual environment:

pip3 install -r requirements_dev.txt
pip3 install -e .

Run like this:

python3 -m photomatrix -h

Usage

The basic usage is:

photomatrix INPUT_IMAGES OUTPUT_IMAGE

where all the images found in the specified input path will be loaded, sorted, combined in a matrix and the result will be written in the specified output path.

Further options that you can customize are:

  • Number of rows vs columns
  • Resize and crop
  • Sorting
  • Border
  • Text to print (e.g. filename or Exif original date)

See the command help (with -h) for more info on these options.

Examples

The following examples use these test input images:

up to

Matrix with border

To build a matrix with a simple border:

photomatrix "data/input/*.jpg" data/output/matrix_border.jpg --border-width-ratio 0.1

resulting in:

Matrix sorted and with text

To build a matrix with inverse filename order, printing the filename in top center position:

photomatrix "data/input/*.jpg" data/output/matrix_sort_text.jpg --sort filename_desc --text-type filename --text-position top_center

resulting in:

Integration Tests

Run the integration tests with:

python3 -m pytest tests/integration

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

photomatrix-0.0.5.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

photomatrix-0.0.5-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file photomatrix-0.0.5.tar.gz.

File metadata

  • Download URL: photomatrix-0.0.5.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

File hashes

Hashes for photomatrix-0.0.5.tar.gz
Algorithm Hash digest
SHA256 c0e757f26c51dbcb642e056138acf0b78a3439c6a0020206a18300e122a05d4d
MD5 a63b4c307513d0569d95a4605508c2dd
BLAKE2b-256 875489622ccb9885b1e28df6edf9eca53f86e126e558288f8b4fcb4b3e54f790

See more details on using hashes here.

File details

Details for the file photomatrix-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: photomatrix-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

File hashes

Hashes for photomatrix-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cfaac868e8f25e0126cd6979aa87f4dc17d598a1fa318588abb5a18b3f6f1781
MD5 da09384bf5ddf492cdb8f2dd586b5133
BLAKE2b-256 132b40403ef0bd8562edc24b3527f97968b0006793de8282bb499c73903842f4

See more details on using hashes here.

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