Pack multiple images of different sizes or formats into one image.
Project description
License Build Status PyPI version Pyversions
image_packer
About
Pack multiple images of different sizes or formats into one image.
- Supported image input formats: - png, bmp, jpg - Supported image
output formats: - png(24 or 32bits)
Compatibility
image_packer works with Python 3.4 or higher.
Dependencies
Pillow
Installation
pip install image-packer
Usage
from image_packer import packer
workpath = './image'
input_filepaths = [
workpath + '/*.png',
workpath + '/*.jpg',
workpath + '/*.bmp',
]
output_filepath = workpath + '/atlas.png'
container_width = 128
options = {
'padding': (1, 1, 1, 1),
'enable_auto_size': True,
'enable_vertical_flip': True,
'force_pow2': False
}
packer.pack(
input_filepaths=input_filepaths,
output_filepath=output_filepath,
container_width=container_width,
options=options
)
Command-line Tool
$ impack -i "./image/*.png" -i "./image/*.jpg" -i "./image/*.bmp" -o "./image/atlas.png" -w 128 -p 1 1 1 1
License
This software is released under the MIT License, see LICENSE.
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
image_packer-0.4.0.tar.gz
(8.8 kB
view hashes)
Built Distribution
Close
Hashes for image_packer-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ceb34d24c1bc66f2605b9c511966f32850231f317744b4c3367856d2bbe0109 |
|
MD5 | 7ada6be2fb7b92e57e0726e1347822a7 |
|
BLAKE2b-256 | 3f8ea87ee8bb258d69d8e85762e583400b7d02910c249e0998f9f3ee5024e66a |