https://github.com/reybits/texture-packer
Texture Packer efficiently packs images into a texture atlas, reducing memory usage and improving rendering performance for games and applications.
https://github.com/reybits/texture-packer
atlas image image-processing jpg packer png texture
Last synced: about 1 year ago
JSON representation
Texture Packer efficiently packs images into a texture atlas, reducing memory usage and improving rendering performance for games and applications.
- Host: GitHub
- URL: https://github.com/reybits/texture-packer
- Owner: reybits
- License: mit
- Created: 2025-02-20T13:35:23.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-14T16:36:59.000Z (over 1 year ago)
- Last Synced: 2025-03-14T16:46:08.203Z (over 1 year ago)
- Topics: atlas, image, image-processing, jpg, packer, png, texture
- Language: C++
- Homepage: https://www.ugolnik.info/texture-packer/
- Size: 409 KB
- Stars: 12
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Texture Packer
master | development
:---------: | :-----------:
[](https://ci.appveyor.com/project/andreyugolnik/texture-packer/branch/master "Branch: master")  | [](https://ci.appveyor.com/project/andreyugolnik/texture-packer/branch/development "Branch: development") 
The Texture Packer tool efficiently combines multiple images into a single optimized texture atlas, reducing memory usage and improving rendering performance. It streamlines asset management for game development and UI design by optimizing space usage with intelligent packing algorithms.
## Key features
- Automatically add images from a folder or via the command line.
- Supports input formats: JPEG, PNG, TGA, BMP, PSD, GIF, HDR, PIC, PNM.
- Exports to PNG (default), TGA, and BMP.
- Ability to trim input images to remove transparent areas.
- Option to set a border around images for better separation.
## Usage
```sh
texpacker INPUT_IMAGE [INPUT_IMAGE] -o ATLAS
INPUT_IMAGE input image name or directory separated by space
-o ATLAS output atlas name (default PNG)
-res DESC_TEXTURE output atlas description as XML
-pot make power of two atlas
-trim trim sprites
-overlay draw overlay over sprite
-dupes allow dupes
-slow use slow method instead kd-tree
-b size add border around sprites
-p size add padding between sprites
```
## Download and build
You can browse the source code repository on GitHub or get a copy using git with the following command:
```sh
git clone https://github.com/andreyugolnik/texture-packer.git
make release
```
## Input files notes
- **JPEG** baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib).
- **PNG** 1/2/4/8-bit-per-channel (16 bpc not supported).
- **TGA** (not sure what subset, if a subset).
- **BMP** non-1bpp, non-RLE.
- **PSD** (composited view only, no extra channels, 8/16 bit-per-channel).
- **GIF** (*comp always reports as 4-channel).
- **HDR** (radiance rgbE format).
- **PIC** (Softimage PIC).
- **PNM** (PPM and PGM binary only).
***
```
Copyright © 2017-2024 Andrey A. Ugolnik. All Rights Reserved.
https://www.ugolnik.info
andrey@ugolnik.info
```