.XCF
GIMP image (eXperimental Computing Facility)
Introduction
XCF is the native format of GIMP, the free image editor. The name comes from the eXperimental Computing Facility at the University of California, Berkeley, where GIMP was started. An XCF file keeps everything GIMP needs to carry on editing: layers, layer groups, channels, masks, paths, guides, the selection and the image’s settings.
The format has grown with GIMP through numbered versions; newer versions add high bit
depths and 64-bit offsets for large images. GIMP also opens XCF files compressed with gzip,
bzip2 or xz, saved as .xcf.gz, .xcf.bz2 or
.xcf.xz.
Software
- GIMP (Windows, macOS, Linux)
- Krita (Windows, macOS, Linux)
- Photopea (web browser)
- XnView MP (Windows, macOS, Linux)
- ImageMagick (Windows, macOS, Linux)
Structure
An XCF file starts with the text gimp xcf and a version: file
for version 0, or v001, v002 and so on, ended by a zero byte. The
image width, height and base type (RGB, greyscale or indexed) follow, and from version 4
the precision. All numbers are big-endian.
A list of image properties comes next, then a list of pointers to the layers and a list of pointers to the channels, each ended by a zero pointer. Every layer has its own properties and points to a hierarchy of pixel data, which is stored in tiles of 64 by 64 pixels, compressed with run-length encoding or zlib.
0Signaturegimp xcfand the version14 bytes14Canvas width, height, base type, precision12 or 16 bytes…Image properties colour map, compression, resolution, guides, parasitesvaries…Layer and channel pointers each list ends with zerovaries…Layers properties, then tiled pixel datavaries