views:

37

answers:

2

In sprite-based systems, it's common to fake rotation of a sprite by having many different images, each showing it rotated an extra few degrees.

Is there any free tool which will take a single image, and output a single image containing several rotations? It should also ideally let us control how many images are in each row.

e.g if I have a 32x32 sprite and I want it rotated at 10 degree intervals, the tool might generate a 320x32 file or a 160x64 file

+1  A: 

You can script the GIMP to do that.

It is free and very powerful. Here is the scripting tutorial. And here a registry of plugins.

Oded
I'm looking at a tool that will do this, not learning a whole new tool just for this one thing. Although if photoshop/Gimp has/had a built-in way to do it, that would be OK as then I can get the art guy to use it.
John
@John - GIMP (and photoshop) have rotation tools that will rotate an image to any degree. Any graphic designer will be able to generate the type of image you want without much trouble (minutes of work, IMHO).
Oded
But when I want a set of 60 rotations done per-file... I wondered if a tool exists where I can put in the rotation interval rather than make my artists a)write a script b)do it by hand. Plus, it would be useful for knocking up test art when an artist isn't free.
John
@John - I know of no tool that does exactly what you want. I would think that you would _have_ to write some sort of script for GIMP/Photoshop or write your own application to do such a thing.
Oded
+2  A: 
  1. Download imagemagick (command-line imaging tools)

  2. convert image.png -rotate 10 10-image.png

  3. convert -page +0+0 image.png -page +32+0 10-image.png -mosaic final.png

You can have as many -page +X+Y imagefile as you want on the line. The size of the final image will be calculated from the extents of the page locations you use and the sizes of the input files.

You can string this together with the scripting language of your choice. There are bindings for most major languages if you don't want to call out to command-line tools.

Lou Franco