[SOLVED] Making an image strip

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
retrotails
Party member
Posts: 212
Joined: Wed Apr 18, 2012 12:37 am

[SOLVED] Making an image strip

Post by retrotails »

I need to make an image strip like this. My files are named 0001.png, 0002.png etc. A stacked strip like this is definitely preferred, not a straight strip.
Image
I also need transparency preserved. I haven't found anything that does this for free, and I might be testing many, many animations (making slight changes etc)
I've been using Paint.NET but that's way too time consuming. Does anybody know of a program that does this free?
Last edited by retrotails on Mon Aug 27, 2012 6:23 pm, edited 1 time in total.
User avatar
Xgoff
Party member
Posts: 211
Joined: Fri Nov 19, 2010 4:20 am

Re: Making an image strip

Post by Xgoff »

retrotails wrote:I need to make an image strip like this. My files are named 0001.png, 0002.png etc. A stacked strip like this is definitely preferred, not a straight strip.
Image
I also need transparency preserved. I haven't found anything that does this for free, and I might be testing many, many animations (making slight changes etc)
I've been using Paint.NET but that's way too time consuming. Does anybody know of a program that does this free?
it probably wouldn't be all that difficult to do something like this in LOVE itself

1. decide how many horizontal tiles you want, then create an imagedata "sheetdata" with width = NHORIZONTAL * TILEWIDTH and height = ceil(NIMAGES / NHORIZONTAL)
2. run a (0-based) loop for the number of images you have that loads each image based on the loopindex (plus 1, apparently) and pastes its data into the sheetdata imagedata at x = (TILEWIDTH * loopindex) % NHORIZONTAL and y = TILEHEIGHT * floor(loopindex / (NHORIZONTAL - 1))
3. save out the imagedata into a new image file
4. ???
5. PROFIT!

i did that in my head so it might be a little off
User avatar
the_leg
Prole
Posts: 25
Joined: Sun Sep 05, 2010 3:43 am

Re: Making an image strip

Post by the_leg »

The montage command from ImageMagick will do this and is free. Here's an example usage:

Code: Select all

montage *.png -mode concatenate -tile 4x4 -background transparent sheet.png
User avatar
retrotails
Party member
Posts: 212
Joined: Wed Apr 18, 2012 12:37 am

Re: Making an image strip

Post by retrotails »

the_leg wrote:The montage command from ImageMagick will do this and is free. Here's an example usage:

Code: Select all

montage *.png -mode concatenate -tile 4x4 -background transparent sheet.png
"no decode delegate for this image format"
Summon a beach, I've got to compile it from source for PNGs?
User avatar
the_leg
Prole
Posts: 25
Joined: Sun Sep 05, 2010 3:43 am

Re: Making an image strip

Post by the_leg »

retrotails wrote:Summon a beach, I've got to compile it from source for PNGs?
I'm not sure. You might want to search around or ask on their support forum.

EDIT:
Make sure you downloaded the "static" version. I ran the Windows version (ImageMagick-6.7.9-2-Q8-windows-static.exe) via Wine (Linux) and it ran fine with png's. The static version ships with PNG support. You can run 'montage -list format' to get a list of supported formats.
Last edited by the_leg on Mon Aug 27, 2012 5:26 am, edited 1 time in total.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Making an image strip

Post by Lafolie »

You could probably do this with an automated task in Photoshop. Mind you, that isn't free. Does gimp have automated tasks?
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Making an image strip

Post by Tesselode »

You could actually just do this manually. It would be a little time consuming, but any program with a pixel grid (like Paint.NET) would make this pretty trivial.
User avatar
the_leg
Prole
Posts: 25
Joined: Sun Sep 05, 2010 3:43 am

Re: Making an image strip

Post by the_leg »

Lafolie wrote:Does gimp have automated tasks?
Yes, via batch mode, e.g. 'gimp -i -b '(command-to-run-here)'. You can use GIMP to do the image strip as well, but it's not built-in. You'd have to write the script yourself, or find a pre-made one.
User avatar
retrotails
Party member
Posts: 212
Joined: Wed Apr 18, 2012 12:37 am

Re: Making an image strip

Post by retrotails »

the_leg wrote:The montage command from ImageMagick will do this and is free. Here's an example usage:

Code: Select all

montage *.png -mode concatenate -tile 4x4 -background transparent sheet.png
Goat tits, (got it) on Linux at least. Since I've just moved my server to Linux (it shares the files with Winblows) I think I'll stay on it. I wish it told me when it needed more permissions, I didn't know I have to be root to modify /media/OS. Anyway, thanks.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests