Skip to main content

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)
atlas

atlas

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


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 details)

Uploaded Source

Built Distribution

image_packer-0.4.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file image_packer-0.4.0.tar.gz.

File metadata

  • Download URL: image_packer-0.4.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.1

File hashes

Hashes for image_packer-0.4.0.tar.gz
Algorithm Hash digest
SHA256 10d0b8e99ed34e1a2d3d87838ba1daf908e04ac7969df8be80b5e6517a053677
MD5 0bae7037cd1d6d0f8a5ad01083c7e6d3
BLAKE2b-256 8af9cd01bfb89ebb9c60711da1f405030ff59e1e9e9ea39126de6ba08d73b673

See more details on using hashes here.

File details

Details for the file image_packer-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: image_packer-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.1

File hashes

Hashes for image_packer-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ceb34d24c1bc66f2605b9c511966f32850231f317744b4c3367856d2bbe0109
MD5 7ada6be2fb7b92e57e0726e1347822a7
BLAKE2b-256 3f8ea87ee8bb258d69d8e85762e583400b7d02910c249e0998f9f3ee5024e66a

See more details on using hashes here.

Supported by

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