Skip to main content

assembles images in a grid

Project description

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]

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

image-grid-0.0.4.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

image_grid-0.0.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file image-grid-0.0.4.tar.gz.

File metadata

  • Download URL: image-grid-0.0.4.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for image-grid-0.0.4.tar.gz
Algorithm Hash digest
SHA256 3aff8191994c84f677642e3a5bebe76e45037a2ecd3460485120058639f5b0e1
MD5 743288f3cb54eaf28ec12b2a3ba7086e
BLAKE2b-256 4e3232dfd59a4bd760be3fb6144a412f48e4b8b191c70416af5d377bcc51d7da

See more details on using hashes here.

File details

Details for the file image_grid-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: image_grid-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for image_grid-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 faf31273a93ef6879f4d1c4f97a53358450210a76dc1eb42a67a012ab4839939
MD5 7cc9e366f5579ce845bff0ba92a024d4
BLAKE2b-256 2d78239647ba14980e2e8ab7aef245986c6eb88516b34509f34335f7b88ad966

See more details on using hashes here.

Supported by

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