GIMP and Standards
GIMP is supposed to integrate well into your workflow. Thus is needs to interoperate with other applications and your desktop. Standards are there to make this happen, so we try to follow established (and sometimes even proposed) standards. Below you will find a list with links to specifications that a GIMP developer may find useful.
GIMP Formats
GIMP project created its own formats for various purposes. The most well known
is the XCF
format, which is our own project format.
- XCF: save format of a work-in-progress image project in GIMP.
- GIMP Brush (GBR): format to store pixmap brushes.
- GIMP Brush Pipe (GIH): format to store a series of pixmap brushes.
- GIMP Generated Brush (VBR): format of “generated” brushes.
- GIMP Brush Pixmap (GPB): OBSOLETE format to store pixel brushes.
- GIMP Gradients (GGR)
- GIMP Pattern (PAT)
- GIMP Palette (GPL): palette format.
Image File Formats
Apart from core formats created by the GIMP project, here are the list of third-party image file formats supported by GIMP.
Generic File Formats
- Extensible Markup Language (XML)
- Describes the XML markup language, used to store the menu layout, the startup tips, help indices and other things.
Metadata File Formats
- Exif (Exchangeable image file format)
- Widely used metadata format.
- Extensible Metadata Platform (XMP)
- Describes XMP, a labeling technology that allows to embed data about a file, known as metadata, into the file itself.
Palette File Formats
The Swatchbooker project has a very nice listing with technical information of existing color palette formats.
Below are more details on formats currently supported (at least in parts) by GIMP:
- GIMP’s Palette Format (GPL)
- GIMP’s own palette format, used to store palettes created in GIMP.
- Adobe Color Table (ACT)
- Section “Color Table” in “Adobe Photoshop File Formats Specification” (November 2019). Only uint8 RGB colors are supported. No specific color spaces can be specified.
- Adobe Color Swatches (ACO)
- Section “Color Swatches” in “Adobe Photoshop File Formats Specification”
(November 2019). RGB, HSB, CMYK, Lab and Grayscale colors are supported, with
uint16 components. No specific color spaces can be specified.
Version 2 of the format allows to set names to colors (they are currently ignored by GIMP). - Adobe Color Books (ACB)
- Section “Color Books” in “Adobe Photoshop File Formats Specification” (November 2019). RGB, CMYK and CIE Lab colors are supported, with uint8 components. No specific color spaces can be specified. Color entries have names.
- Adobe Swatch Exchange (ASE)
- Specifications were not found online but there are various blog
posts
by third-parties.
AFAWK, it supports RGB, CMYK, Grayscale and CIE Lab in floating point precision.
The palette has a name, colors have names too and each color in the palette has
its own color model (possibly mixing RGB, CMYK, Grayscale and Lab entries).
No specific color spaces can be specified.
Finally color entries have a type between “Process”, “Global” and “Spot” which seems to imply it can be used for spot colors, though there is not much information on how and if it is for specific catalogs or vendor-agnostic. It seems it would require additional information for this field to be actually useful. - RIFF Palette File Format
- Section “Palette File Format” (3-18) of the “Multimedia Programming Interface
and Data Specifications 1.0”.
GIMP currently supports the “Simple PAL Format” (RGB only) but not the “Extended PAL Format” which can additionally contain YUV and XYZ palettes.
Only uint8 RGB colors are supported. No specific color spaces can be specified.
See also Microsoft docs on PALETTEENTRY structure. - JASC Palettes (Paint Shop Pro)
- A plain text file with header “JASC-PAL” line followed by “0100” line,
followed by number of colors (in plain text, not binary), followed by as many
lines as the number of colors. Each of these lines is a triplet of integers (in
plain text) separated by space. Line separation is Windows style
CR-LF
.
Only uint8 RGB colors are supported. No specific color spaces can be specified. - SwatchBooker format (SBZ)
- Though it is sometimes considered deprecated because the corresponding
software’s development is abandoned these days, it is the most complete of all
currently supported formats.
Palettes can have a name and a description (with possible localization). Color entries support (possibly mixed) sRGB, RGB, HSV, HSL, CMY, CMYK and spot colors (possibly with multiple model representation for a given spot color), though the catalog does not seem to be associated to spot color identifiers.
And finally, when relevant, a space can be attributed to color values through embedded ICC profiles.
Sample files can be found from our merge request as well as from the FreieFarbe project.
Color Management
- sRGB Color Space
- Describes sRGB, a color space proposed as a standard default color space for the Internet and other interested vendors.
- ICC Specification
- Specifies the profile format defined by the International Color Consortium (ICC). The intent of this format is to provide a cross-platform device profile format that can be used to translate color data between device colorspaces.
- ICC Profiles In X Specification
- This is a specification for associating ICC color profiles with X screens. GIMP 2.4 implements this proposed standard.
Color Compositing
Our compositing and blending algorithms are not necessarily exactly the below W3C specifications, yet they contain base concepts and definitions of the process behind compositing images into one combined result:
Desktop Standards
- AppStream
- Metadata to describe a software. It is used massively on Linux by
software centers (such as GNOME Software or KDE Discover), which is
where they get a software name, description, screenshots, release
information and more. Our AppStream file is visible in
desktop/org.gimp.GIMP.appdata.xml.in.in
. We also generates the release note tab of the “Welcome Dialog” from the release data in our AppStream file. Finally we also use this format as metadata for the new extension format of GIMP. - Desktop Entry Specification
- This document describes desktop entries: files describing
information about an application such as the name, icon, and
description. GIMP installs such a
.desktop
file. - Desktop Message Bus
- D-Bus is a message bus for the desktop. If available, GIMP uses it to detect if another GIMP instance is already running. In the future, GIMP might make even more use of D-Bus.
- File URI Specification
- Specifies how URIs for normal UNIX filenames (file: URIs) are interpreted and created. This functionality is provided by GLib,
- GNOME Human Interface Guidelines
- We don’t follow this spec to the word but we try to adopt as much of these guidelines as makes sense.
- Recent File Storage Specification
- Provides a standard mechanism for storing a list of recently used files. Supported since GIMP version 2.1.6.
- Shared MIME Database
- The shared MIME database contains common MIME types, descriptions, and rules for determining the types of files. GIMP file plug-ins should use the MIME types and descriptions defined here.
- Startup Notification
- Specifies a mechanism allowing a desktop environment to track application startup to provide user feedback. GTK provides support for this protocol.
- Thumbnail Managing Standard
- Deals with the permanent storage of previews for file
content. In particular, it tries to define a general and
widely accepted standard for this task. GIMP 2.0 implements
this standard and dropped support for the old-fashioned
.xvpics .
Standards specific to the X window system
- Clipboards
- Not a formal specification, but explains the consensus of the Qt and GTK developers on how the X clipboard works.
- Clipboard Manager
- The Clipboard Manager specification describes how applications can actively store the contents of the clipboard when the application is quit. This requires that a compliant clipboard manager is running.
- Drag-and-Drop Protocol for the X Window System
- XDND defines a standard for drag and drop on X11. It is implemented by GTK.
- Direct Save Protocol for the X Window System
- XDS defines an extension to XDND that allow users to save a file by simply dragging it to a file manager window. GIMP 2.4 supports this protocol.
- Extended Window Manager Hints
- The Window Manager Specification is meant to unify the GNOME and KDE window manager hint conventions.
- Inter-Client Communication Conventions Manual (ICCCM)
- This spec defines the interaction between X11 clients. In particular it talks about selections, cut buffers, window and session management, manipulation of shared resources and device color characterization.
- XSETTINGS
- The XSETTINGS protocol provides a mechanism for applications written with different toolkits to share simple configuration settings such as double-click-times and background colors. GTK hides this from us.
Programming Standards
- GIMP Coding Style guidelines
- Our project coding style guidelines. It explains how the GIMP source code should be formatted.
- GNU coding standards
- A guide to writing portable, robust and reliable programs. Also defines the GNU coding style. Our own Coding Style originally derivates from the GNU Coding style.
- ISO/IEC 9899
- ISO 9899 is the international standard for the C programming language.