If you look at almost any graphics program, you will see a range of image file types. These are designed for specific purposes, and the following section from the GIMP manual will give guidance as to which one to used, and when. Further information on this topic can be found in Wise Web Weaving, the DoE's web guide.

 
 To save your file as a particular file type in 'The Gimp' all you need to do is to type the 3 letter file extension onto the filename when you save it.

If you do not put a 3 letter file extension, you will get an error message.


XCF: The native file format of The GIMP

When saving images that are not yet complete and you intend to continue working later, the most appropriate file format to choose is XCF. This file format is the native file format that The GIMP uses. XCF supports many features including compression.

While XCF is an excellent choice in file format, it is unknown outside of GIMP, so you will need to save images to be used in other packages in in a different format. XCF has little value for webbed documents, for example.

If you want to save your image in another format, but are likely to want to return later to work on it in 'The Gimp', then it is a good idea to save one version in .xcf format and another copy in your desired final format.

PNG: Portable Network Graphics

PNG can preserve all the transparency and colour of an image and uses powerful lossless compression to reduce file sizes. In particular, computer-generated images usually compress very well.

PNG supports smooth 8-bit transparency which can make for exceptional zero loss web graphics. However, some browsers do not fully support all of the features that PNG offers. As always, check compatibility between the viewer and the format before committing to a particular format. 


JPEG: Joint Picture Expert Group

Photographs and other images from the real world (which include most images taken with digital cameras and colour scans) can be compressed very effectively with JPEG.
JPEG images are compressed using a semi intelligent lossy algorithm that is very good at fooling the human eye. This format is excellent for saving on space and preserving viewable quality, but there are many situations where JPEG is an unsuitable format to choose. If the image contains broad bands of single colour or is mechanical in nature (many broad straight single colour areas), JPEG is a bad choice of format. Another note to make is that repeated saving of images that are JPEG encoded will result in degradation to quality over each save. As with any powerful option, be aware of this format's lossy compression method, and ensure the choice of JPEG is not made lightly.
The JPEG filter used by The GIMP utilizes JFIF compression for compatibility with most existing software. It allows you to adjust the quality of the image and see immediately how the saved image will look and how big the file will be.

If you need to compress your image, save it as .jpg file type.  You will then be asked for some settings, one of which is quality.  This is what determines the amount of compression.

 

GIF: Graphics Interchange Format

Unlike all the other file formats described here GIF requires the use of a colourmap. This means that a maximum of 256 different colours will be preserved in the saved image. The GIMP can perform the conversion automatically, but the results may sometimes be disappointing due to this limitation of GIF. It is however quite suitable for most images with large expanses of single colours.


Despite the poor compression and limited number of colours, there are two desirable features of GIF for web designers. GIF is non lossy, so no image data is lost over saves, and GIF supports animation and transparency. The GIMP supports both of these features fully.

Support for saving as GIF is a tricky issue. The format uses the LZW compression method, which is patented, and products which use it are required to pay for this ability. This does not fit with GIMP's open source philosophy. However, in organisations which have paid the patent holders (Unisys) for bulk use of the LZW method, or in countries where Unisys does not hold a patent, there is a GIFplugin available.

IMPORTANT NOTE: Australia is NOT one of the countries where Unisiys has no patent. DoE does NOT hold a Unisys license. Hence using the GIF plugin is in breach of the Unisys patent. You have been warned! 

BMP: Windows Bitmap

This format is often used by applications for Microsoft Windows. Full colour images can be stored in this format, but shortcomings of the compression scheme mean that the resulting files may be very large. Image resolution is preserved.
Some web browsers have included support for viewing BMP images but this is not common, so you should avoid using them on the web.

TIFF: Tagged Image File Format

One of the oldest formats still commonly in use today, TIFF is a very powerful but complicated format. If the need to export images from The GIMP to a package which doesn't support any of the other formats mentioned earlier in this section, it will probably accept TIFF.
TIFF can preserve all the transparency and colour of your original image, but you may lose some of this information when importing the TIFF into another package.