Image File Formats
Table of Contents
On this page, we will try to keep an updated list of existing image file formats and their current support level in GIMP.
Here is GIMP policy regarding image file format support:
- For import: we want to support every image format, however good or bad it is. Being able to restore old images in outdated and long-forgotten formats is definitely a real use case.
- For export: we want to support at least modern and most common formats.
- Importing code should be lenient regarding incorrect formatting, fixing format errors automatically when possible, or optionally inquiring users if needed. Being able to salvage broken files (when feasible) is ideal.
- Exporting code should be strict: files created by GIMP must conform to specs and work everywhere.
APNG
- Specifications
- APNG
- Description
- 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.
- Support Level
- None (WIP)
- Implementation Notes
- 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 the recommended library is a patched
libpng
, using the same namespace as legacylibpng
and not distributed commonly by distributions. This is apparently how it is shipped, bundled, in Firefox historically.Nevertheless it seems that some browsers, like Chromium, have managed to support it using only legacy
libpng
.
AVIF
- Specifications
- Description
- The royalty free counterpart of
HEIC
, using AV1 (created specifically to be royalty-free by AOMedia) image encoding and the same HEIF container format.
It supports up to 12-bit per channel, animation, HDR images and more. - Support Level
- Import and Export
- Implementation Notes
- GIMP uses libheif for
support, though there are talks that moving to
libavif could be better to
support some features, such as animated images (currently unsupported
in GIMP).
The advantage of
libheif
is that it also supportsHEIC
and moreHEIF
variants so we avoid additional dependencies.
BMP
- Specifications
- BMP
- Description
- 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
BMP
file.
This format is lossless. - Support Level
- Import and Export
- Implementation Notes
- Though the format is fairly simple, it can be more featureful than
first imagined since a bunch of improvements happened for GIMP 3.0,
with support of:
- 8/16/32 bit-per-channel, integer and floating point.
- 2-bit indexed and ALPHABITFIELDS files.
- OS/2 Huffman encoding.
- RLE4 and RLE8 compressions
- RLE24 (OS/2 variant of BMP compression).
- Huffman (another compression variant for OS/2 BMP). The source code contains a human readable version of the Huffman code tables (generate-huffman.h). During build, the actual header huffman.h is generated which includes a digested form of these tables.
- Load bmp chunk-wise instead of whole image: loads image tile-height lines at a time to reduce memory allocation for temporary image buffer.
- Undefined pixels: RLE BMPs can have undefined pixels. GIMP loads those images with an alpha channel and make undefined pixels transparent.
DDS
- Specifications
- DDS (DirectDraw Surface)
- Description
- 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. - Support Level
- Import and Export
- Implementation Notes
- TODO
GIF
- Specifications
- GIF (Graphics Interchange Format)
- Description
- Legacy image formats which gained wide popularity on the web thanks to
its small cycle animation abilities.
These last years, it slowly loses its throne to new formats such asWebP
, though it is still quite omnipresent. - Support Level
- Import and Export
- Implementation Notes
- TODO
HEIC
- Specifications
- HEIC
- Support Level
- Import and Export
- Description
- Modern image format, supporting up to 12-bit per channel, animation, HDR images and more, using HEVC image encoding and the HEIF container format.
- Implementation Notes
- GIMP uses libheif for support.
HEVC
has patent issues, unlike itsAVIF
counterpart. This is why many Free Software distributors do not wish to packageHEIC
support, hence why ourfile-heif
plug-in has runtime tests to determine support forAVIF
orHEIC
, making it in particular able to support someHEIF
variants.
HEIF
- Specifications
- HEIF (as ISO standard, the specifications are not freely available)
- Description
- The image and animation container used for
AVIF
andHEIC
. - Support Level
- GIMP supports this container by supporting
AVIF
,HEIC
andHEJ2
image formats.
Note: many people confuseHEIF
withHEIC
and use the former to mean the latter.
HEJ2
- Description
- Yet another variant of
HEIF
using JPEG 2000 encoding inside theHEIF
container. - Support Level
- Import only
JPEG
- Specifications
- JPEG (Joint Photographic Experts Group)
- Description
- JPEG and JPEG File Interchange Format (JFIF) are legacy image formats. Similarly to GIF for small animated images, this format (in its 8-bit variant) is still the most popular format for photography on the web, despite quality issues.
- Support Level
- Import and Export
- Implementation Notes
- Both Import and Export are mandatory support in GIMP.
- A lossless mode exists in JPEG, though it is so rarely implemented in various software that this format is widely considered as a lossy format. Nevertheless 8, 12 and 16-bit lossless has been implemented in libjpeg-turbo (the library we rely on) in 2022.
- With jpeg-turbo >= 3.0, GIMP 3 now supports loading 12 and 16-bit per channel JPEG files (with GIMP 2.10, we only supported 8-bit JPEG, because it used to be only choose because 8 or 12-bit JPEG support at compile time.
JPEG 2000
- Specifications
- Description
- 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. - Support Level
- Import only (JPEG 2000 images and codestreams)
- Implementation Notes
- GIMP uses OpenJPEG, one of the reference
implementations, having moved
away
from
libjasper
for GIMP 2.10.
JPEG XL
- Specifications
- Support Level
- Import and Export
- Description
- 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.
- Implementation Notes
- GIMP uses the reference implementation library libjxl.
JNG
- Specifications
- JNG (JPEG Network Graphics) Format
- Support Level
- None
- Implementation Notes
- Maybe the MNG plug-in could be extended? Or should it be a dedicated JNG plug-in.
MNG
- Specifications
- MNG (Multiple-image Network Graphics) Format
- Description
- Yet another variation of PNG, specifically dedicated at supporting
animated files. Unlike
APNG
, this format was developed by the PNG development group and had therefore better early support, though usage now is limited. - Support Level
- Export only
OpenRaster
- Specifications
- OpenRaster
- Description
- 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.
- Support Level
- Import and Export
- Specifications
- PDF (Portable Document Format)
- Description
- File format for document layout. It contains vector as well as raster images, text and more.
- Support Level
- Import and Export
- Implementation Notes
- GIMP uses
libpoppler
for import andlibcairo-pdf
for export. - We consider PDF import a mandatory feature.
- The
poppler-data
package for CJK and Cyrillic support is also mandatory because we do not consider that proper support of worldwide languages should be an “option”. - GIMP doesn’t support any of the
PDF/X
variants yet, but this will need to happen for good printing support. One of the Free Software with goodPDF/X
support is Scribus, making it a good complementary software to GIMP for doing printing jobs.
- GIMP uses
PNG
- Specifications
- Portable Network Graphics (PNG)
- Description
- Legacy compressed lossless image format, with alpha channel support.
The format 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) thanJPEG
, and even for photography or complex images when quality matters more than size or when transparency was required. - Support Level
- Import and Export
- Implementation Notes
- Both Import and Export of PNG are mandatory support in GIMP.
- GIMP also reads patterns in the PNG file format and it stores thumbnails as PNG images.
PSD
- Specifications
- PSD (Photoshop Document)
- Support Level
- Import and Export
- Description
- Core file format for Photoshop project files. A public specification is available though it is not always very complete, missing features or details.
SVG
- Specifications
- Scalable Vector Graphics (SVG) 1.1
- Description
- Standard vector format, still evolving.
- Support Level
- Import only
- Implementation Notes
- Though GIMP is not primarily a vector software, considering how important this format is, the ability to rasterize SVG images is a mandatory feature.
- GIMP also uses SVG for import and export of paths and it also loads gradients from SVG files.
- We currently use
librsvg
as our backend library, which became problematic when they moved to Rust, because Rust does not support all architectures (so our requirement for having SVG support as mandatory feature clashes with our requirement for having GIMP available everywhere). Attempt to find another reliable SVG library has not been successful so far. Eventually moving toCTX
when it will be more featureful regarding SVG support is also a possibility.
TIFF
- Specifications
- Description
- Legacy image format, which is well known for being able to do nearly everything.
- Support Level
- Import and Export
- Implementation Notes
- The “nearly doing anything” characteristics of TIFF is also kinda the unfortunate problem of this format as all the features are often kept very generic and several software will interpret same images differently. For instance, the “Reduced Image” feature of TIFF may be used as a thumbnail by some programs, but sometimes not. This is only one example among many.
DNG
- Specifications
- Digital Negative (DNG)
- Description
- Gormat, proposed by Adobe, aiming to become a standard for storing raw data from digital cameras.
- Support Level
- None
- Implementation Notes
- 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
darktable
orRawTherapee
. 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 aGimpLoadProcedure
flagged with thegimp_load_procedure_set_handles_raw()
function.
WebP
- Specifications
- WebP
- Description
- 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.
- Support Level
- Import and Export
- Implementation Notes
- GIMP supports this format through the libwebp reference library.