5. Files

The GIMP is capable of reading and writing a large variety of graphics file formats. With the exception of GIMP's native XCF file type, file handling is done by plug-ins. Thus, it is relatively easy to extend GIMP to new file types when the need arises.

Not all file types are equally good for all purposes. This part of the documentation should help you understand the advantages and disadvantages of each type.

Opening Files

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

  • The most obvious is to open it using a menu, by choosing File->Open from either the Toolbox menu or an image menu. This brings up a File Chooser dialog, allowing you to navigate to the file and click on its name. This method works well if you know the name of the file you want to open, and where it is located. It is not so convenient if you want to find the file on the basis of a thumbnail.

  • If instead of a file name, you have a URI (i.e., a web address) for the image, you can open it using the menu, by choosing File->Open Location from either the Toolbox menu or an image menu. This brings up a small dialog that allows you to enter the URI.

  • If the image is one that you previously created using GIMP, perhaps the easiest way to open it is from the menu, using File->Open Recent. This gives you a scrollable list of the images you have most recently worked on in, with icons beside them. You need only select the one you want, and it will be opened.

  • If you have associated the file type of the image with GIMP, either when you installed GIMP or later, then you can navigate to the file using a file manager (such as Nautilus in Linux, or Windows Explorer in Windows), and once you have found it, double-click on the icon. If things are set up properly, this will cause the image to open in GIMP.

  • Alternatively, once you have found the file, you can click on its icon and drag it into the GIMP Toolbox. (If instead you drag it into an existing GIMP image, it will be added to that image as a new layer or set of layers.)

  • For many applications, you can click on a displayed image (a full image, not just a thumbnail) and drag it into the GIMP toolbox.

  • Also for many applications, if the application gives you a way of copying the image to the clipboard, you can then open the image in GIMP by choosing File->Acquire->Paste as New from the Toolbox menu. Support for this is somewhat variable, however, so your best bet is to try it and see whether it works.

  • You might want to take a look at a program called gthumb, an image-management application that in several ways nicely complements GIMP. In gthumb, you can cause an image to open in GIMP either by right-clicking on the icon and selecting GIMP from among the list of options, or by dragging the icon into the GIMP Toolbox. See the gthumb home page for more information. Other similar applications : gqview, xnview

When you open a file, using the File menu or any other method, GIMP needs to determine what type of file it is. Unless there is no alternative, GIMP does not simply rely on the extension (such as ".jpg") to determine the file type, because extensions are not reliable: they 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. Instead, GIMP first tries to recognize a file by examining its contents: most of the commonly used graphics 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.

Saving Files

The Export dialog

There is no file format, with the exception of GIMP's native XCF format, that is capable of storing all the data in a GIMP image. When you ask to save an image in a format that will not completely represent it, GIMP notifies you of this, tells you what kind of information will be lost, and asks you whether you would like to "export" the image in a form that the file type can handle. Exporting an image does not modify the image itself, so you do not lose anything by doing this.

[Note] Note

When you close an image (possibly by quitting GIMP), you are warned if the image is "dirty"; that is, if it has been changed without subsequently being saved. Saving an image in any file format will cause the image to be considered "not dirty", even if the file format does not represent all of the information from the image.