Giter Club home page Giter Club logo

sprpack's Introduction

sprpack

Sprite Sheet Packer is a fully featured tool for combining multiple individual images into a single, efficiently laid out image.

Sprite Sheet Packer supports reading PNG, JPG, BMP, and GIF images and produces a single PNG image with all the images embedded inside of it. The resulting image is transparent anywhere an image is not drawn. The tool also produces an accompanying file that maps the image file names with their rectangles, for use in your program to find the regions of the image you are interested in.

The tool supports options for setting the maximum resulting image size, padding (added to the size of the individual images), as well as options for requiring a power-of-two sized output and a square output.

Here are some sample output files created from 720 individual images found here: blogoscoped.com using various combinations of the "Require Power of Two Output" and "Require Square Output" options:

Non-power of two and non-square:

Non-power of two and non-square

Power of two and non-square:

Power of two and non-square

Non-power of two and square:

Non-power of two and square

Power of two and square:

Power of two and square

sprpack --help

sprpack 1.0.1

Copyright (C) 2023 sprpack

--image (Default: Atlas.png) Output file name for the image.

--map (Default: Atlas_map.xml) Output file name for the map.

--mw (Default: 4096) Maximum output width.

--mh (Default: 4096) Maximum output height.

--pad (Default: 1) Padding between images.

--pow2 (Default: false) Ensures output dimensions are powers of two.

--sqr (Default: false) Ensures output is square.

--recursive (Default: false) Searches subdirectories of any input directories.

--il Path to file listing the images to build.

--help Display this help screen.

--version Display version information.

value pos. 0 Images to pack.

All code was originaly written by Kelly Gravelyn except the code for computing the efficient placement of the rectangles which was taken from the Nuclex Framework.

I removed the windows forms GUI and replaced the Command line argument parser and also the use of System.Draw has been replaced with SixLabors.ImageSharp all in an effort to make this work in linux.

sprpack's People

Contributors

mort8088 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.