Skip to main content

image-grid

python module to make image grids

install

$ pip install image-grid

Installing the module registers a script image-grid which can be run from any folder.

usage

$ image-grid --folder ./images --n 4 --rows 1 --width 1000 --fill
saved image-grid.jpg, (166, 998, 3), 27.1KiB

$ image-grid -f images -n 14 -r 2 -w 1000 --aspect-ratio 1 --out image-grid.png
saved image-grid.png, (284, 999, 4), 338.7KiB

$ image-grid -f images -n 16 --fill -a 1 -w 400 -bs 0 -o square.png
saved square.png, (400, 400, 4), 263.1KiB

$ image-grid -h
usage: image-grid [-h] (-f FOLDER | -i IMAGES [IMAGES ...]) [-o OUT] [-y]
                  [-q JPEG_QUALITY] [-t FILE_TYPES] [-a ASPECT_RATIO] [--fill]
                  [--interpolation {auto,nearest,bilinear,bicubic,lanczos}]
                  [-n N] [--no-sort] [--shuffle] [-w WIDTH | -H HEIGHT]
                  [-r ROWS] [-c COLUMNS] [-bs BORDER_SIZE]
                  [-bsa BORDER_SIZE_AROUND]
                  [-bc BORDER_COLOR [BORDER_COLOR ...]]

optional arguments:
  -h, --help            show this help message and exit
  -f FOLDER, --folder FOLDER
                        path to folder with images
  -i IMAGES [IMAGES ...], --images IMAGES [IMAGES ...]
                        image file paths
  -o OUT, --out OUT     output file path
  -y, --override        if set, it will override the output file
  -q JPEG_QUALITY, --jpeg-quality JPEG_QUALITY
                        jpeg quality [1-100]
  -t FILE_TYPES, --file-types FILE_TYPES
  -a ASPECT_RATIO, --aspect-ratio ASPECT_RATIO
                        aspect ratio of grid cells (width/height). if not
                        defined, it will be chosen from the first image
  --fill                fill the grid cell instead of fitting the whole image
                        in the cell
  --interpolation {auto,nearest,bilinear,bicubic,lanczos}
  -n N, --n N           limit the amount of pictures to include
  --no-sort             don't sort images by path
  --shuffle             shuffle image order
  -w WIDTH, --width WIDTH
                        approx width of image grid in px
  -H HEIGHT, --height HEIGHT
                        approx height of image grid in px
  -r ROWS, --rows ROWS  number of rows in image grid
  -c COLUMNS, --columns COLUMNS
                        number of columns in image grid
  -bs BORDER_SIZE, --border-size BORDER_SIZE
                        border size in px
  -bsa BORDER_SIZE_AROUND, --border-size-around BORDER_SIZE_AROUND
                        border around image grid in px
  -bc BORDER_COLOR [BORDER_COLOR ...], --border-color BORDER_COLOR [BORDER_COLOR ...]
                        rgba color [0-255]

Metadata

Release files for image-grid 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for image-grid 0.0.4
File Size Uploaded
image-grid-0.0.4.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for image-grid 0.0.4
File Interpreter ABI Platform
image_grid-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / image-grid-0.0.4.tar.gz

Download URL image-grid-0.0.4.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3aff8191994c84f677642e3a5bebe76e45037a2ecd3460485120058639f5b0e1
BLAKE2b-256 checksum
How to use checksums
4e3232dfd59a4bd760be3fb6144a412f48e4b8b191c70416af5d377bcc51d7da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

Release files / image_grid-0.0.4-py3-none-any.whl

Download URL image_grid-0.0.4-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
faf31273a93ef6879f4d1c4f97a53358450210a76dc1eb42a67a012ab4839939
BLAKE2b-256 checksum
How to use checksums
2d78239647ba14980e2e8ab7aef245986c6eb88516b34509f34335f7b88ad966
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page