GIMP for Games: Basic Game Image Editing with GIMP

Mithat Konar

2014-03-29

This is a guide to using the GNU Image Manipulation Program (a.k.a, GIMP or the 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, but it’s the one I use. It’s libre software (something that’s important to me), it’s available for all major desktop operating systems, 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.

Getting GIMP

Windows

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.

Installing as a regular program

  1. Go to the GIMP download page, scroll down past the “GIMP for Unix-like systems” until you see the “Show other downloads” link. Click that link.
  2. After clicking the link, scroll down again to find the “GIMP for Windows” section. In the “GIMP for Windows” section, click the “Download GIMP 2.X.X” link (2.8.10 as of this writing).
  3. When the download is complete, run the installer and Bob’s your uncle.

Installing as a portable application

  1. Go to http://portableapps.com/apps/graphics_pictures/gimp_portable.
  2. Click the “Download Now” button.
  3. When the download is complete, run the installer, tell it where to put GIMP, and Bob’s your uncle.

MacOS

  1. Go to the GIMP download page, scroll down past the “GIMP for Unix-like systems” until you see the “Show other downloads” link. Click that link.
  2. After clicking the link, scroll down again to find the “GIMP for Mac OS X” section. In the “GIMP for Mac OS X” section, follow the instructions in the “Native builds” section.

Linux

  1. Go to the GIMP download page.
  2. Follow the instruction under “GIMP for Unix-like systems” to install GIMP for your distribution.

Using GIMP

You’ll probably want to watch the videos below in full screen mode. (Click the “full screen” icon in the player toolbar.)

Converting images to PNG

  1. Use File > Open … to open the image you want to convert.
  2. After the image opens, go to File > Export … and in the resulting dialog:
  3. In the export options dialog, just go with the defaults and click “Export”.

Note: If you do a File > Save or File > Save As…, GIMP will save the file in its own .xcf format. To save any changes you have made to a PNG file, go to File > Export to imageName.png.

Cropping images

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.

Rectangular select and crop

  1. Pick the Rectangular Select tool either from Tools > Selection Tools > Rectangular Select or by clicking the icon for the tool in the Toolbox.
  2. Click and drag on the image to select the portion of the image you want to keep.
  3. Crop away the unwanted bits by going to Image > Crop to Selection

Autocrop

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:

  1. Select > All
  2. Image > Autocrop image

Making backgrounds transparent

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:

  1. Add a transparent layer to the image with Layer > Transparency > Add Alpha Channel.
  2. Select the Fuzzy Select Tool (Tools > Selection Tools > Fuzzy Select or in the Toolbox).
  3. Click on the background.
  4. Clear the selected region by going to Edit > Clear or by hitting the Delete key.

Resizing images

To shrink an image down,

  1. Go to Image > Scale Image… (NOT Canvas Size… or Print Size…).
  2. In the dialog’s Image Size area, select pixels from the top right-side dropdown menu.
  3. If you want the height and width to scale proportionately, make sure the link image is set to “linked”.
  4. Set the width and/or height.
  5. Click the “Scale” button.

Note: The XXX% control at the bottom is a Zoom control, not a resize control!

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.