Gif to sprite sheet?
-
- Fast Inserter
- Posts: 193
- Joined: Fri May 06, 2016 10:35 pm
- Contact:
Gif to sprite sheet?
How do I turn a gif into a sprite sheet? Or, rather, a series of images into a sprite sheet (instead of using Blender and the Python script)?
Re: Gif to sprite sheet?
https://www.imagemagick.org/script/comm ... essing.phpBizobinator wrote:How do I turn a gif into a sprite sheet? Or, rather, a series of images into a sprite sheet (instead of using Blender and the Python script)?
You can read more than one image from a sequence with a frame range. For example, you can extract the first four frames of an image sequence:
Code: Select all
magick 'images.gif[0-3]' images.mng
Code: Select all
image-%d.jpg
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Gif to sprite sheet?
I do it by hand.
I also use an obscure old piece of software called Paint shop pro, so, if I described exactly, features I use might not exist in your program.
Basically... I find out what the minimum size the sprite needs to be so the entire thing fits in an un-moving rectangle, then that's my size
I then set a grid to the size of this grid.
Count how many sprites there are, and figure out their arangements. if it needs to be 8 frames wide, I create a blank sheet which is 8 times the width of a sprite wide. Similar calculation for height.
then... pick up the first image, drop it in the top left corner. pick up the second, and drop it in the space to it's right... making sure the top left pixel lines up to the top left pixel in my grind. The grid is purely part of the GUI, so isn't saved when I save the image.
and so on.
I also use an obscure old piece of software called Paint shop pro, so, if I described exactly, features I use might not exist in your program.
Basically... I find out what the minimum size the sprite needs to be so the entire thing fits in an un-moving rectangle, then that's my size
I then set a grid to the size of this grid.
Count how many sprites there are, and figure out their arangements. if it needs to be 8 frames wide, I create a blank sheet which is 8 times the width of a sprite wide. Similar calculation for height.
then... pick up the first image, drop it in the top left corner. pick up the second, and drop it in the space to it's right... making sure the top left pixel lines up to the top left pixel in my grind. The grid is purely part of the GUI, so isn't saved when I save the image.
and so on.
-
- Fast Inserter
- Posts: 193
- Joined: Fri May 06, 2016 10:35 pm
- Contact:
Re: Gif to sprite sheet?
bobingabout wrote:I do it by hand.
I also use an obscure old piece of software called Paint shop pro, so, if I described exactly, features I use might not exist in your program.
Basically... I find out what the minimum size the sprite needs to be so the entire thing fits in an un-moving rectangle, then that's my size
I then set a grid to the size of this grid.
Count how many sprites there are, and figure out their arangements. if it needs to be 8 frames wide, I create a blank sheet which is 8 times the width of a sprite wide. Similar calculation for height.
then... pick up the first image, drop it in the top left corner. pick up the second, and drop it in the space to it's right... making sure the top left pixel lines up to the top left pixel in my grind. The grid is purely part of the GUI, so isn't saved when I save the image.
and so on.
I'm trying out this method, but I've had a snag (again with the picture out of bounds).
Code: Select all
filename = "__mlg_factorio__/graphics/air-horn-action.png",
priority = "extra-high",
width = 640,
height = 640,
frame_count = 100,
line_length = 10,
animation_speed = 1,
The sprite sheet I'm using is 10x10 chunks, with each sprite meant to be 64x64.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: Gif to sprite sheet?
it's width and height per frame
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ

"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ

"should be fixed"