Free webp to jpg
Compressed-XCF

Compressed GIMP XCF Image

image/x-compressed-xcf Released 1995 · by The GIMP Team

The image/x-compressed-xcf MIME type represents a compressed version of the XCF (eXperimental Computing Facility) file format, which is the native working project format for GIMP (GNU Image Manipulation Program). Because standard XCF files store complex, multi-layered pixel data with only basic RLE (Run-Length Encoding) compression, they can become extremely large. To mitigate this, GIMP natively supports saving and opening these files wrapped in standard gzip (.xcf.gz) or bzip2 (.xcf.bz2) compression algorithms, significantly reducing file sizes while maintaining all editable layers, masks, paths, and channels.

Raster Graphics & Project Files Transparency Animation ✦ HDR Production Ready

Technical Specifications

MIME Type
image/x-compressed-xcf
Extensions
.xcf.gz.xcf.bz2.xcfgz.xcfbz2
Container
Gzip or Bzip2 Archive
Compression
Gzip (Deflate) & Bzip2
Algorithms
DeflateBWT (Burrows-Wheeler)
Color Depth
8-bit (Per Channel), 16-bit (Integer/Floating Point), 32-bit (Integer/Floating Point)
Metadata
EXIF XMP ICC
Capabilities
Transparency
Animation
Progressive Loading
Alpha Channel
HDR Support
Official Specification
Aliases: application/x-xcf-compressedimage/xcf

Magic Bytes & HTTP Headers

File Signature (Magic Bytes)
1F 8B 08 (gzip) or 42 5A 68 (bzip2)
ASCII: \x1F\x8B\x08 or BZh
HTTP Headers
Content-Type: image/x-compressed-xcf
Content-Type: application/x-gzip
HTML Accept Attribute
accept="image/x-compressed-xcf, .xcf.gz, .xcf.bz2"

Browser Support Matrix

Browser Status Min Version
Chrome Chrome
Not Supported
Firefox Firefox
Not Supported
Safari Safari
Not Supported
Edge Edge
Not Supported
Internet Explorer Internet Explorer
Not Supported Legacy

Advantages & Limitations

Advantages
  • Drastically reduces the massive file sizes of standard XCF project files, saving significant disk space
  • Preserves 100% of the non-destructive editing data (layers, masks, paths, guides) from the GIMP workspace
  • Uses standard, universally supported compression algorithms (gzip/bzip2) meaning the archive can be rescued or extracted by standard OS tools if GIMP is unavailable
Limitations
  • Increases file load and save times due to the CPU overhead required to compress and decompress the massive pixel arrays
  • Impossible for automated tools to parse metadata or dimensions without first unarchiving the payload into memory
  • File extension combinations (.xcf.gz) can confuse basic MIME sniffers which stop reading at the .gz extension

Developer Code Snippets

import gzip
import magic

# Identify the outer wrapper
file_type = magic.from_file('project.xcf.gz', mime=True)
print(f'Outer format: {file_type}') # Likely 'application/gzip'

# Validate the inner payload
with gzip.open('project.xcf.gz', 'rb') as f:
    inner_magic = f.read(9)
    is_xcf = inner_magic == b'gimp xcf '
    print(f'Contains valid XCF: {is_xcf}')
const fs = require('fs');
const zlib = require('zlib');

const stream = fs.createReadStream('project.xcf.gz');
const unzip = zlib.createGunzip();

stream.pipe(unzip).once('data', (chunk) => {
    const isXCF = chunk.toString('ascii', 0, 9) === 'gimp xcf ';
    console.log('Is compressed XCF:', isXCF);
    unzip.destroy();
    stream.destroy();
});
import (
    "compress/gzip"
    "os"
    "bytes"
)
// Open the file and pass it to gzip.NewReader
// Read the first 9 bytes of the uncompressed stream
// isXCF := bytes.Equal(uncompressedBuf[:9], []byte("gimp xcf "))
$mime = mime_content_type('project.xcf.gz');
echo $mime; // Standard PHP setups will return 'application/x-gzip'. You must use the zlib extension to read the internal payload.

File Detection Steps

How to programmatically detect a image/x-compressed-xcf file by reading its raw bytes:

  1. 1 Because the file is compressed, it will NOT start with the standard 'gimp xcf' magic string.
  2. 2 It will start with standard archive headers: 1F 8B 08 for gzip, or 42 5A 68 for bzip2.
  3. 3 To verify it is actually a compressed XCF, you must decompress the stream in memory and check the first 9 bytes of the extracted payload for the ASCII string 'gimp xcf ' (Hex: 67 69 6D 70 20 78 63 66 20).

Software Support

G
GIMP
ImageMagick ImageMagick
7
7-Zip / GNU gzip (For extraction)

Conversion Tools

Share & Embed

Markdown Badge
Compressed-XCF Format Badge
[![Compressed-XCF Format](https://freewebptojpg.com/mime/image/compressed-xcf/badge.svg)](https://freewebptojpg.com/mime/image/compressed-xcf)
Interactive iframe Widget
<iframe src="https://freewebptojpg.com/mime/image/compressed-xcf/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="Compressed-XCF Specs"></iframe>

JSON API

All data on this page is available as a free, open JSON API. Use it in your project, documentation, or tooling.

GET https://freewebptojpg.com/mime/image/compressed-xcf.json Open JSON
Free to use
No auth required
CORS enabled
Use from any domain
Cached 24h
Cache-Control headers set

Frequently Asked Questions

What is an .xcf.gz file?

An .xcf.gz file is a GIMP XCF project file that has been compressed using the gzip algorithm to save disk space. GIMP handles the compression and decompression automatically in the background when you save or open the file.

How do I extract or open an image/x-compressed-xcf file?

You can open it directly in GIMP, which natively understands the compression wrapper. Alternatively, because it is just a standard archive, you can use extraction tools like 7-Zip, WinRAR, or the Linux 'gunzip' command to extract the raw, uncompressed .xcf file.

Can I view an .xcf.bz2 file in a web browser?

No. Web browsers do not support the GIMP XCF format, nor do they natively decompress arbitrary bzip2 image archives. You must export the image to a web-safe format like WebP, PNG, or JPEG from within GIMP.

Related Formats

Share this format