Pack multiple images of different sizes or formats into one image.
Project description
`License <https://github.com/Hasenpfote/image_packer/blob/master/LICENSE>`__
`Build Status <https://travis-ci.org/Hasenpfote/image_packer>`__ `PyPI
version <https://badge.fury.io/py/image-packer>`__
`Pyversions <https://img.shields.io/pypi/pyversions/image-packer.svg?style=flat>`__
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)
.. raw:: html
<p align="center">
.. raw:: html
</p>
Compatibility
-------------
image_packer works with Python 3.4 or higher.
Dependencies
------------
- Pillow
Installation
------------
::
pip install image-packer
Usage
-----
.. code:: python
from image_packer import packer
workpath = './image'
input_filepaths = [
workpath + '/*.png',
workpath + '/*.jpg',
workpath + '/*.bmp',
]
output_filepath = workpath + '/atlas.png'
container_width = 128
padding = (1, 1, 1, 1)
packer.pack(
input_filepaths=input_filepaths,
output_filepath=output_filepath,
container_width=container_width,
padding=padding,
enable_auto_size=True,
enable_vertical_flip=True,
force_pow2=False
)
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.
`Build Status <https://travis-ci.org/Hasenpfote/image_packer>`__ `PyPI
version <https://badge.fury.io/py/image-packer>`__
`Pyversions <https://img.shields.io/pypi/pyversions/image-packer.svg?style=flat>`__
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)
.. raw:: html
<p align="center">
.. raw:: html
</p>
Compatibility
-------------
image_packer works with Python 3.4 or higher.
Dependencies
------------
- Pillow
Installation
------------
::
pip install image-packer
Usage
-----
.. code:: python
from image_packer import packer
workpath = './image'
input_filepaths = [
workpath + '/*.png',
workpath + '/*.jpg',
workpath + '/*.bmp',
]
output_filepath = workpath + '/atlas.png'
container_width = 128
padding = (1, 1, 1, 1)
packer.pack(
input_filepaths=input_filepaths,
output_filepath=output_filepath,
container_width=container_width,
padding=padding,
enable_auto_size=True,
enable_vertical_flip=True,
force_pow2=False
)
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.2.0.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for image_packer-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c2329d7d92c3eddd330fda6ebd414fdb190d2100b880e6c701d071cc5018c12 |
|
MD5 | 3bf05bd41af99785244a38760a45f726 |
|
BLAKE2b-256 | d6c5ee3019712bbc85bd2a78e864d2aea9bee6bd71fc73eee1389d17a24db290 |