Git Product home page Git Product logo

imagedivider's Introduction

Kotlin ImageDivider

ImageDivider

ImageDivider is a spritesheet divider. You only need a json file with the description of what you need and you will get each image of the animations separately and with the corresponding name.

How to use

Extract the contents of the zip and run ImageDivider.bat or the sh version from your terminal indicating the path of the configuration file.

.\ImageDivider-1.0.0\bin\ImageDivider.bat .\exampleFiles\config.json

if you use a relative path, it must be relative to the folder you are running the script from. In the example above this would be the case.

ImageDivider_folder_tree_example

config.json file example

{
  "imagePath": "./exampleFiles/slime.png",
  "widthFrames": 7,
  "heightFrames": 5,
  "animations": [
    {
      "name": "idle",
      "row": 0,
      "frames": 4
    },{
      "name": "run",
      "row": 1,
      "frames": 6
    },{
      "name": "die",
      "row": 4,
      "frames": 5
    }
  ],
  "outputFolder": "slime"
}
  • imagePath: relative path from config.json to spritesheet.
  • widthFrames: total frames horizontally.
  • heightFrames: total frames vertically.
  • animations: list of animations you want to split into images.
  • Each animation has a name that will be assigned to each frame followed by the frame index. You must indicate the row in which it is located and finally the number of frames that make up the animation.
  • outputFolder: name of the folder where the new images will be generated. If this folder does not exist, it will be created before adding the images.

Limitations

An animation is supposed to be in one row of the spritesheet, so if it's split across multiple rows it may not get the expected result.

imagedivider's People

Contributors

juanleo83 avatar

Watchers

James Cloos avatar  avatar

imagedivider's Issues

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.