Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question

closed as off-topic by Josh Petrie Oct 22 '14 at 16:32

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the 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
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

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