3. Opening Files
| Chapter 5. Getting Images into GIMP |

## 3. Opening Files

There are several ways of opening an existing image in GIMP:

### 3.1. Open File

The most obvious way to open an existing image is the menu. Use File → Open to open the Open Image dialog,allowing you to navigate to the file and click on its name. This method works well if you know the name and location of the file you want to open. Although the Open Image dialog does have a preview pane, it is not convenient (easy) to find an image based on a thumbnail.

| Note
While opening a file, GIMP must determine the file type. Unfortunately, the file extension, such as `.jpg`, is not reliable: file extensions vary from system to system; any file can be renamed to have any extension; and there are many reasons why a file name might lack an extension. GIMP first tries to recognize a file by examining its contents: most of the commonly used file formats have “magic headers” that permit them to be recognized. Only if the magic yields no result does GIMP resort to using the extension.

Figure 5.4. The “Open Image” dialog

GIMP 2.2 introduced a new Open Image dialog that provides several features to help you navigate quickly to a file. Perhaps the most important is the ability to create “bookmarks”, or Places, for folders that you use often. Your list of bookmarks appears on the left side of the dialog. The ones at the top, such as “Desktop”, are provided automatically. Use the the Add button to add the current directory to the list. Use the Remove button to remove the selected bookmark. Double-click on a bookmark to navigate directly to that directory.

The center of the dialog contains a listing of the contents of the selected directory. Subdirectories are shown at the top of the list, files below them. By default, all files in the directory are listed, but you can restrict the listing to image files of a specific type using the File Type selection menu that appears beneath the directory listing.

When you select an image file entry in the listing, a preview appears on the right side of the dialog, along with some basic information about the image. Note that previews are cached when they are generated, and there are some things you can do that may cause a preview to be incorrect. If you suspect that this may be happening, you can force a new preview to be generated by holding down the Ctrl key and clicking in the Preview area.

By default, a Location text box is present in the File Open dialog. It may be absent: the Ctrl+L key combination toggles this text box. Alternatively, you can click on the icon of the paper and pencil in the upper left corner to toggle the text box.

| Note
If you select a file name from the list, and click the “Open” button in the lower right corner or the dialog, it is almost always true that GIMP will automatically determine the file type for you. On rare occasions, mainly if the file type is unusual and the name lacks a meaningful extension, GIMP may fail to correctly identify the file type. Use Select File Type at the bottom of the dialog to manually specify the file type if this is required. More commonly, though, if GIMP fails to open an image file, it is either corrupt or not a supported format.

2. Creating new Files |  | 3.2. Open Location