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, defaultNone): Background color.None: defaults to white (#ffffff), or transparent ifdstis a.pngfile.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
Release history Release notifications | RSS feed
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.1.tar.gz
(14.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pyimgrid-0.1.1-py3-none-any.whl
(14.4 kB
view details)
File details
Details for the file pyimgrid-0.1.1.tar.gz.
File metadata
- Download URL: pyimgrid-0.1.1.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1ceebeb17f9fe1226230269028d3e08c8e7b82500af48f0e3120747bec0ebe8
|
|
| MD5 |
08e2ddbcb187592b423654dcace404b8
|
|
| BLAKE2b-256 |
6de101f534f93d7175c7d2dcee17ea68645ce970f886f2a9d9a813fddaff5da3
|
File details
Details for the file pyimgrid-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyimgrid-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a39f8e8f0e0f910755ba80f127bb69bdecd342bfaeac996d540b491efd316aec
|
|
| MD5 |
6bb0bc2b15179e0aef8ac4eba7ba74f9
|
|
| BLAKE2b-256 |
ae6501937b9169a7327f26161d28f80e457502f79f0349fdab68cf947e891089
|