Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An open source implementation of a texture bin packing algorithm. It's similar to texture tools like the TexturePacker.

License

NotificationsYou must be signed in to change notification settings

paladin-t/framepacker

Repository files navigation

framepacker is a freeware which implements a texture bin packing algorithm. It's similar to texture tools like the TexturePacker. You are free to use, copy, modify or distribute it under the MIT license.

It implements a bin packer algorithm refer to theBinary Tree Bin Packing Algorithm.

Compile

A C++ 11 compiler is required to compile the source code. Theframepacker::packer template class inframepacker.hpp is the algorithm implementation. And it offers a specialization inframepacker.cpp using stb image.

Usage

It works as a command line tool:

  • framepacker FILE_LIST [-o output_file] [OPTIONS] - Packs some images
  • FILE_LIST
    • := file * : Eg. file1.png file2.png
  • OPTIONS
    • := -p N : Padding, default to 1
    • := -s MxN : Expected texture size, eg. 256x512, may enlarge result
    • := -t : Disable rotation
    • := -w : Disable forcing texture to POT (Power of 2)
    • := -m : Disable alpha trim

Eg. "framepacker foo.png bar.png -o out", it generates a packedout.png image and anotherout.json meta data which includes packing information to look up slices from the image.

Performance

framepacker is fast, it packs 200 textures in less than 0.15s on common desktop machines at 2015.

About

An open source implementation of a texture bin packing algorithm. It's similar to texture tools like the TexturePacker.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp