Code Monkey home page Code Monkey logo

spritesheetpacker's Introduction

SpriteSheetPacker

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 has a full UI including 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. The tool has buttons for managing the desired images and also accepts drag-and-drop of image files into the list for true ease of use.

The build process is completely multithreaded to ensure smooth operation of the application even when processing large numbers of images.

The tool now supports plugins so you can create your own image or map file types without having to edit the application. Once you've compiled a DLL with your types in it, simply place it next to the exe and run the application. When you are choosing your image or map file location, use the drop down to choose the file type. For an example, see the XNA XML exporter in the source tree which exports an XML file in XNA Content format instead of the standard text file. The XNA XML exporter is also included, in compiled form, with the regular download.

Here are some sample output files created from 720 individual images found here: http://blogoscoped.com/archive/2006-08-08-n51.html using various combinations of the "Require Power of Two Output" and "Require Square Output" options:

Non-power of two and non-square:

Power of two and non-square:

Non-power of two and square:

Power of two and square:

For an example of parsing the text output with XNA Game Studio, see Using Sprite Sheet Packer with XNA GS.

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

spritesheetpacker's People

Contributors

dsandler avatar

Watchers

 avatar  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.