Launch OpenGPEX

OpenGPEX 1.x documentation (legacy editor).

v2 Docs

File Format & Storage

How OpenGPEX handles image import/export across 10+ formats with full color fidelity, and how it stores project data using content-addressable immutable assets.


Storage: Content-Addressable System (CAS)

Every image asset in the editor is stored by its content hash (SHA-256, with a MurmurHash3-128 fallback on insecure HTTP contexts) in IndexedDB:

Import image → SHA-256 hash → Store as {hash: Blob} in IndexedDB
                                    │
                                    ▼
              Layer references hash (metadata only)
              Duplicate imports → same hash → zero extra storage

Design benefits:

  • Deduplication — Identical images share a single blob regardless of how many layers reference them
  • Immutability — Original pixels are never modified; edits create new derivative assets
  • Non-destructive editing — Undo can always restore to any previous asset state
  • Garbage collection — Unreferenced assets are periodically cleaned by the Asset Sentinel

16-bit Color Fidelity Pipeline

OpenGPEX preserves full color depth from import:

Import 16-bit TIFF/PNG/RAW
    ↓
Store original source via frame.assetId (full precision blob, skipTiling)
    ↓
Generate 8-bit display version for Canvas rendering
    ↓
Edit using 8-bit preview (real-time, native refresh rate)
    ↓
Export: currently 8-bit composited output (16-bit export lane declared via exportBitDepth, not yet wired)

The original high-precision source data is never discarded during editing — it is stored as a regular asset referenced by frame.assetId and preserved through the full project lifecycle (GC-protected, dehydrated into .gpex files, etc.).

Future: When WebGPU enables native float16/float32 compositing, the 16-bit source blob will be consumed directly by the GPU compositor for full-precision export — without the complexity of a separate vips-based composite pipeline.


Format Support

Import (10+ formats)

Category Formats Technology
Standard web JPEG, PNG, WebP, AVIF, BMP, GIF Browser-native decode
Professional TIFF (16-bit, CMYK, BigTIFF) wasm-vips in Worker
Camera RAW CR2, NEF, ARW, DNG libraw-wasm in Worker
Vector SVG, EPS resvg-wasm / Ghostscript in Worker

Export

Format Precision Technology
JPEG, PNG, WebP, BMP 8-bit Browser-native encode
AVIF 8-bit @jsquash/avif WASM encoder in dedicated Worker
TIFF 8-bit wasm-vips in Worker (LZW/ZIP/JPEG compression, BigTIFF option)
GIF 8-bit (animated) gifenc (NeuQuant + LZW)

Metadata Round-Trip

Full preservation of image metadata across the pipeline:

Data Supported Formats Behavior
ICC Color Profiles JPEG, PNG, TIFF, WebP, HEIC Extract on import, inject on export
EXIF JPEG, WebP, TIFF Preserved through edit cycle
DPI/Resolution JPEG, PNG, TIFF, BMP Dual-layer: frame-level + per-layer record
PNG chunks PNG 9 chunk types parsed (pHYs, iCCP, tEXt, gAMA, etc.)

.gpex Project Format

The native save format is a binary container that bundles:

  • Project manifest (frames, layers, state)
  • All referenced image assets (by CAS hash)
  • Preview thumbnail for cloud file listing

This container is what gets uploaded to GPEX-Cloud for cloud persistence.


GIF Animation

Multi-frame GIF files are decomposed into individual layers on import (linked via gifSequenceId), and reassembled into animated GIF on export — preserving frame timing and loop metadata.


Last updated: 2026-07-30