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 = {
    'margin': (1, 1, 1, 1),
    'collapse_margin': False,
    '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 -m 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.9.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

image_packer-0.9.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: image_packer-0.9.0.tar.gz
  • Upload date:
  • Size: 13.4 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.9.0.tar.gz
Algorithm Hash digest
SHA256 d40d244979e39850c42344ba03ac13e120347bd3d5190eccf7dfebab4535db9e
MD5 177bebb03c34d28ccd854d4a6b770334
BLAKE2b-256 c3ec0a897d95d34a89306582918f125279327e683c69ad02bd6831fab04733e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: image_packer-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 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.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0288e95311b72ff02bd1588d7ff52f4e5b8d0ece2696433815147c826591eca2
MD5 474a41fd6ab6a8a335d30de0bcdbcfa8
BLAKE2b-256 7c8fa184a4b030c3dce60404c528767502587bd3772647d918bef69039fedc72

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