Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have been programming for a bit and for 2D games and other applications I frequently make large images for the levels / the maps. Before I place these into the games I split the large images down into smaller equally sized squares, but I do this manually in 'the Gimp' and it takes ages sometimes! Is there some software which can do this much quicker for me, where I can select how I want the image split down etc? And for Mac as well?

Thanks

share|improve this question
    
I was going to recommend zeoptex or tiled map editor, but I don't think they are really suited for your problem. –  Ali.S Oct 22 '11 at 20:06
    
Thanks for commenting, but no, all I want is to be able to load an image say 5000 x 5000 pixels and for it to produce 25 No. 1000 x 1000 pixel images :) –  Paul Reed Oct 22 '11 at 20:19

2 Answers 2

up vote 3 down vote accepted

One possibility is ImageMagick, a set of command-line tools for doing things with images. You can write a script in your language of choice that calls the command-line tools to do whatever you need.

Another possibility is Python paired with PIL (Python Imaging Library), which lets you load image files as Python objects, programmatically perform operations on them and save them out again.

share|improve this answer
    
if it's going to be a combination of command line editing tool with some scripting language you can also use ffmpeg, although it's mainly developed to edit videos but it can also manipulate images perfectly. –  Ali.S Oct 22 '11 at 20:51
    
+1 ImageMagick is a great choice for tasks like this. Also very powerful with scripts (that could even be integrated into the build process) –  bummzack Oct 22 '11 at 21:46
    
It may be good, but I have no idea how to use Terminal, and cannot figure out what to do to even get Terminal to see the program, I have used the Mac Port install option. But now have no idea what else to do :( –  Paul Reed Oct 22 '11 at 22:40
    
Fantastic got it working and it is exactly what I wanted! –  Paul Reed Oct 22 '11 at 23:01

An image editing program I use all the time is PixelMator (app store link). It's not free, but it's very good and takes advantage of OS X. I don't think it has a tool for specifying a size and getting images dice automatically, but it does have a tool expressly for dicing up images manually. It's designed for dealing with web site graphics which are often broken up.

share|improve this answer
    
I initially used the Gimp for mac and found it awkward to work with compared to the PC version, so tried PixelMator but it isn't accurate enough and would have taken just as long to do if not longer as it would have in Gimp :) –  Paul Reed Oct 24 '11 at 8:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.