User Tools

Site Tools


No renderer 'pdf' found for mode 'pdf'
basic_game_image_editing_with_gimp

This is an old revision of the document!


Basic Games Image Editing with GIMP

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.

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. Click the “Download Now” button.
  2. 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. Follow the instruction under “GIMP for Unix-like systems” to install GIMP for your distribution.

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:
    1. Be sure Select File Type is set to (By Extension).
    2. Enter imageName.png (Make sure the extension is .png)
    3. Click “Export”.
  3. To save 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.
    1. You can change the selected area by clicking and dragging on any of the rectangles in the four corners.
  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

basic_game_image_editing_with_gimp.1396061930.txt.gz · Last modified: 2014/03/29 02:58 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki