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 project created its own formats for various purposes. The most well known
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)
These are image formats supported in GIMP or not. Note that GIMP has a policy to support every image format, however good or bad it is, at least as an import format. For instance, being able to restore old images in outdated and long-forgotten formats is definitely a real use case.
- Extension of the PNG format, adding support for animated images. It is
backward compatible with PNG-supporting software where it would simply
show the first frame instead of an animation. While adoption was
stalling for years, it gained more support across browsers recently.
It is not supported in GIMP yet. The biggest reason is that it relied on
libpng, using the same namespace as legacy
libpngand not distributed commonly by distributions. This is apparently how it is shipped, bundedl, in Firefox historically. Nevertheless it seems that some browsers, like Chromium , have managed to support it using only legacy
libpng. It would need to be studied.
- AVIF (AV1 Image File Format)
- The royalty free counterpart of
HEIC, using AV1 image encoding and the same HEIF container format. It supports up to 12-bit per channel, animation, HDR images and more. GIMP uses libheif for support, though there are talks that moving to libavif could be better to support some features, such as animated images.
- Legacy image format with no or low compression and very simple to
implement. There doesn’t seem to be centralized format specifications
though we find various pages on the web describing its structure.
From a quick skimming, the Wikipedia page itself might be all there is
to know to encode and decode a
- DDS (DirectDraw Surface)
- Microsoft format for storing data compressed with the previously proprietary S3 Texture Compression (S3TC) algorithm, which can be decompressed in hardware by GPUs. It seems to be quite used in the video game industry in particular for assets such as textures and other images mapped on 3D objects.
- GIF (Graphics Interchange Format)
- Describes the GIF file format, used in the GIF plug-in. GIF
is bad for various reasons, so modern programs should not use it for
anything else than supporting people’s files and use cases (i.e. import
and export, as we do in GIMP). Yet it kept quite a popularity for very
long as the one image format to do small cycle animations on the web.
These last years, it slowly loses its throne to new formats such as
WebP, though it is still quite omnipresent.
- Modern image format, supporting up to 12-bit per channel, animation,
HDR images and more, using HEVC image encoding and the HEIF container format.
HEVChas patent issues , unlike its
AV1, which was created specifically to be royalty-free by the Alliance for Open Media (AOMedia). This is why many Free Software distributors do not wish to package
HEICsupport, hence why our
file-heifplug-in runs runtime tests to determine support for
HEIC, making it in particular able to support only
AVIF. GIMP uses libheif for support. HEVC specifications are freely available.
- The image and animation container used for
HEIC. As ISO standard, the specifications are not freely available. GIMP supports this container by supporting
- JPEG (Joint Photographic Experts Group)
- Describes the JPEG JFIF file format, used in the JPEG plug-in. JPEG is
lossy regarding pixel data (though there is a lossless JPEG standard,
currently unsupported by
the library we rely on), and only up to 8-bit per channel. Once again,
not entirely true: 12-bit support is added as an extension of the JPEG
libjpeg-turbohas support, but it needs to be set at compile time and only one variant — 8 or 12-bit — at the same time. Plans exist to provide both 8 and 12-bit support to a program but there is no timeline when it will happen. Anyway similarly to GIF for small animated images, this format (in the 8-bit variant) is still the most popular format for photography on the web, despite its quality issues.
- JPEG 2000
- New-ish format, still by the Joint Photographic Experts Group, which supports lossy and lossless compression, high bit depth (up to 38-bits per channel!). It compresses a bit better than legacy JPEG but this is not really its focus. This format clearly didn’t gain a lot of popularity, at least towards the general public. Its biggest usage though is for the cinema market as it is the image format used for image tracks in the DCP container format, which is the de-facto standard in the cinema industry these days as it replaced films reels in theaters using digital movie projectors. As ISO standards , the specifications are not freely available. For support, GIMP uses OpenJPEG , one of the reference implementations.
- JPEG XL
- New format, still by the Joint Photographic Experts Group, which supports lossy and lossless compression, high bit depth, and supposed to compress a lot better than legacy JPEG. As ISO standards , the specifications are not freely available. The reference implementation though, libjxl , is what we use in GIMP.
- JNG (JPEG Network Graphics) Format
- GIMP doesn’t use this format yet but it would be nice to extend the MNG plug-in to use it and to add a dedicated JNG plug-in.
- MNG (Multiple-image Network Graphics) Format
- Describes the MNG file format, used in the MNG plug-in.
- Meant to be an open exchange format for raster editing software. It is still a bit bare and evolution has stalled these last years. GIMP contributors originally contributed as part of its creation process.
- PDF (Portable Document Format)
- File format for document layout. It contains vector as well as raster
images, text and more.
libpopplerfor import and
libcairo-pdffor export. It doesn’t support any of the
PDF/Xvariants yet, but this will need to happen for good printing support. One of the Free Software with good
PDF/Xsupport is Scribus, making it a good complementary software to GIMP for doing printing jobs.
- Portable Network Graphics (PNG)
- Describes the PNG file format, used in the PNG plug-in. GIMP
also reads patterns in the PNG file format and it stores
thumbnails as PNG images. It supports up to 16-bit per component and
proper alpha channel.
It is widely used on the web, especially for flat colored images (logos
or other design) where it can even sometimes end up in smaller files (or
close size, yet better quality) than
JPEG, and even for photography or complex images when quality matters more than size (thanks to its lossless property regarding pixel data).
- PSD (Photoshop Document)
- Core file format for Photoshop project files. A public specification is available though it is not always very complete, missing features or details.
- Scalable Vector Graphics (SVG) 1.1
- Describes the SVG file format, used in the SVG plug-in. GIMP uses SVG for import and export of paths and it also loads gradients from SVG files.
- TIFF 6.0
- Describes the TIFF file format, used in the TIFF plug-in. See also the Unofficial TIFF Home Page .
- Digital Negative (DNG)
- Specifies DNG, a format, proposed by Adobe, aiming to become
a standard for storing raw data from digital cameras.
As for most other “RAW image formats”, GIMP doesn’t support them
natively anymore and instead promotes passing through a RAW image
developer, such as
RawTherapee. GIMP has an infrastructure system redirecting automatically RAW images to one of these software if available, then get the result back for further processing. Other RAW developer software may be added to GIMP by creating proper plug-ins with a
GimpLoadProcedureflagged with the
- Modern image format, supporting lossy and lossless compression, animation and transparency. It is often described as a replacement for GIF, JPEG and PNG, but not that much further as it doesn’t support high bit depth or many color models . This makes it good for web usage, but less for advanced image usages where other recent formats make take the higher road. GIMP supports this format through the libwebp reference library.
- Extensible Markup Language (XML)
- Describes the XML markup language, used to store the menu layout, the startup tips, help indices and other things.
- 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.
- 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.
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:
- 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 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
- 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.
- 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.
- 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.