This is a guide to using GIMP for doing some of the more common kinds of things you need to do when editing images for use in games.
GIMP may or may not be the best tool for doing this. It's open source (something that's important to me), it's available for all major desktop operating systems, I know it, and it works.
In what follows, I am assuming you are using PNG images for all your image resources. With small changes, everything should apply to other formats as well.
You've got two choices if you are going to use GIMP on Windows: you can install it as a regular program or you can use the portable version
Watch the videos below at high resolution and full screen.
To increase resolution, start playing the video, then click the gear icon in the player toolbar, then select 720pHD.
To view full screen, click the “Full screen” icon in the player toolbar.)
imageName.png
(Make sure the extension is .png
)Note: To save any changes you have made to a PNG file, go to File > Export to imageName.png If you do a File > Save or File > Save As…, GIMP will save the file in its own .xcf format.
Often times an image will have extra padding around it that you won't want. Extra padding makes sprites larger than they need to be–which will affect collisions and other things. There are two ways to crop away the extra padding.
Image > Crop to Selection
You can use Autocrop if the background of your image is all exactly one color. Autocrop will crop the image to the smallest possible size. To use Autocrop
The following assumes the image you want to modify is well-suited to having its background made transparent. An image that's well suited to this is one where:
You can still make backgrounds transparent with images that don't meet both these requirements, but the process is more involved.
To make the background of a “well suited” image transparent:
To shrink an image down,
Feel free to experiment with the different Interpolation settings. Some algorithms work better for some images than others. “Cubic” seems to be a good default. You can use the above method to make an image larger as well, but shinking images works muuuuch better than making them larger.