Skip to main content

Generates a grid image from an input image.

Project description

pyimgrid

Generates a grid image from an input image.

Installation

pip install pyimgrid

Usage

from pyimgrid import create_image

create_image(
    src='input.png',
    dst='output.png',
    cols=3,
    rows=2,
    gap=5,
)

Parameters

  • src (str): Path to the input image.
  • dst (str): Path to save the generated image.
  • cols (int): Number of columns in the grid.
  • rows (int): Number of rows in the grid.
  • gap (int): Spacing in pixels between images (and around the edges).
  • bg (str | tuple | None, default None): Background color.
    • None: defaults to white (#ffffff), or transparent if dst is a .png file.
    • str: a color in any format accepted by Pillow (e.g. '#ffffff').
    • tuple: an RGBA tuple (e.g. (0, 0, 0, 0)).

License

MIT

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

pyimgrid-0.1.0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyimgrid-0.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file pyimgrid-0.1.0.tar.gz.

File metadata

  • Download URL: pyimgrid-0.1.0.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.20

File hashes

Hashes for pyimgrid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f02c59f94587c69837fa62bc8aa80bc3347cfee19da510c427def8cb50296e6d
MD5 ad9f3edfccac1a559b8d4320e516daef
BLAKE2b-256 a2824617ac813a3e653fc4aa119a22c464f53d0d564d630d8f05c68800045447

See more details on using hashes here.

File details

Details for the file pyimgrid-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyimgrid-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.20

File hashes

Hashes for pyimgrid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5d265873c807eaa2bb7436cd5fd84941bb80d290515e9ee8c14b9e0ac9d5b36
MD5 3ac25f8cd8de209bcbe07c97efa1567a
BLAKE2b-256 9d4cd200e07509a5805b159bb02e0e464882e3bca9632e85d52270f95cbcd225

See more details on using hashes here.

Supported by

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