20.3 GIMP’s Native Formats

In GIMP, a work in progress often includes multiple layers, transparency, and an active selection. It might also have layer masks, channels containing saved selections, and paths. It probably also includes undo history. Anything you can do in GIMP can be represented by the native format, XCF. A native format is a file structure designed specifically for a piece of software.

GIMP also has tools for defining new brushes, patterns, palettes, and gradients. Each of those also has a native format in GIMP. You can download custom brushes, patterns, palettes, and gradients from the Web or even create your own and post them for other users to download. We show you how in Chapter 22.

XCF

XCF is GIMP’s most important native format. When you save an image in XCF, you’re saving all its components, layers, layer groups, masks, channels, paths, guides, and so on. The only thing that isn’t saved is the undo history, which would increase the file size significantly.

XCF is the only format that is guaranteed to store all the information in an image that you’re working on in GIMP, and it’s the best format for a work in progress. If you want to store a file in another format, but you want to make additional changes at some point, always save a copy of your work as XCF.

Because XCF stores so much information, an XCF file can be rather large, but GIMP allows you to compress it using one of two lossless external compression algorithms: the one used by Gzip and the one used by Bzip2. Bzip2 yields better results than Gzip but only by 30% or 40% at most. Bzip2 is also much slower. GIMP can load and save files compressed using these algorithms without first having to unpack the files. The compression is indicated by a second extension, which is either .gz or .bz2. On a GNU/Linux operating system, the suffix does not determinate the file format, which is specified by the file’s first few bytes, but it can be helpful for users.

Although XCF can be read by several other applications, including ImageMagick, Krita, and Inkscape, it’s not intended as a universal format.

When you save an image with Image: File > Save As or , GIMP automatically assumes the file format is XCF and adds the corresponding extension to the filename. For all other output formats, you must export the image with Image: File > Export As or . The export commands cannot generate XCF. If an image is modified and then exported, GIMP does not consider the image saved and opens a warning window if you try to close it.

Other Native Formats

In addition to images, whose natural format is XCF, four other objects have their own native formats in GIMP. These are brushes, patterns, gradients, and palettes. Each of these objects has a specialized dockable dialog: The Brushes dialog, the Patterns dialog, and the Gradients dialog are present, by default, in the multi-dialog window; and the Palettes dialog can be opened via Image: Windows > Dockable dialogs or from the dialog menu, which you open by clicking the small triangle found at the top of all dockable dialogs.

These objects are stored on the computer in special folders, which you can define using Image: Edit > Preferences in the Folders entry. Each category has a systemwide folder, where objects are stored when installing or updating GIMP, and a personal folder, where you can store objects you create.

You can create, edit, or delete a brush, pattern, and palette by using the buttons at the bottom of the corresponding dialog. These let you do the following:

  • Edit the current object. Editing works only if the object is in the personal folder. Otherwise, you can only look at the characteristics of the object.

  • Create a new object.

  • Duplicate the current object.

  • Delete the current object (if it’s in your personal folder).

  • Refresh the object list in the dialog.

You can also access these options via the dialog menu or by right-clicking a brush, palette, or pattern. Patterns are not built using a specific tool, so the Patterns dialog only contains buttons for deleting, refreshing, and opening the current pattern as an image.

Building and saving new brushes, patterns, dialogs, and palettes is described in Chapter 22.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset