Coder Social home page Coder Social logo

spritebaker's Introduction

Build Status

Sprite Baker

A simple tool for baking a bunch of images into one larger image. Will write a sprite atlas and a json file that tells you where the sub images are.

Usage

spritebaker -width 512 -height 512 -input [image1.png image1.png ...] -output sprite_atlas.png

Arguments

Required

-width		Output image width.
-height		Output image height.
-input		A list of input images that will be packed into the output image.
-output		The output image file name.

Optional

-bg_color       Red, green, blue, alpha channel color values for the background. Range 0 - 255.
-padding        Padding around each sub image in pixels.
-trim_images    Trim fully transparent pixels in the input images.
-sprite_format  Output special sprite format. 

Example

Here's two outputs from the tool. The first one is 650 x 650 without trimming and the second one is 512 x 512 with trimming.

Implementation

This tools is build using nothings stb libraries, image reader/writer library as well as the rect packing library. For reading and writing json files nlohmann's json library is used.

spritebaker's People

Contributors

niblitlvl50 avatar

Stargazers

Peter avatar Matt Oztalay avatar Iggy Zuk avatar James Robertson avatar wayne avatar Lee Reilly avatar James T avatar Raveen Rajadorai avatar Nicholas Fuller avatar Zachary Zoltek avatar Stew Esho 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.