GIMP 3.0 Non-Destructive Filter Storage Explained
GIMP 3.0 introduces true non-destructive editing by allowing users to attach live filter effect stacks directly to layers without permanently modifying source pixels. By leveraging the Generic Graphical Library (GEGL) graph architecture, GIMP 3.0 treats filters as dynamic metadata and modular processing nodes linked to layer attributes. This article explains how GIMP 3.0 structures its node pipeline, handles runtime rendering, preserves the underlying pixel buffer, and serializes live filter stacks into the native XCF file format.
The Role of the GEGL Directed Acyclic Graph
At the core of GIMP 3.0's non-destructive pipeline is GEGL, an image processing framework based on a Directed Acyclic Graph (DAG). In legacy versions of GIMP, applying a filter took the layer's pixel buffer, calculated the pixel manipulation, and immediately wrote the altered pixels back into the buffer, discarding the original data.
In GIMP 3.0, a layer is no longer just an isolated pixel container. Instead, it acts as a composite structure inside the GEGL DAG. The original, untouched image data serves as the source node at the bottom of the layer's sub-graph. When an effect is applied, it is instantiated as a distinct GEGL operation node that sits downstream from the source buffer.
Attaching Effects to Layer Attributes
Rather than baking changes into the raster buffer, GIMP 3.0
associates live effects with the layer via a dedicated
GimpDrawableFilter class. This mechanism anchors filters
directly to the layer’s attribute data:
- Node Chaining: Each added filter is inserted as a sequential node in an effects chain linked to the layer's output. The output of the base image feeds into Filter A, which feeds into Filter B, and so on.
- Parameter Containment: The specific parameters of a filter (such as blur radius, color curves, or noise levels) are stored as key-value properties within the filter’s node configuration rather than as pixel mutations.
- Individual Blending Controls: Every filter node in the stack maintains its own attributes, including opacity, blending mode, and visibility toggles, allowing per-filter compositing before the layer reaches the master composition graph.
Dynamic Evaluation and Caching
Because the original pixel buffer remains unaltered, GIMP 3.0 renders the effects stack dynamically:
- Demand-Driven Rendering: When a layer is viewed or exported, GEGL requests image data from the end of the node chain.
- Intermediate Caching: GEGL evaluates the pipeline through a tile-based caching system. Unaltered areas or unchanged filter nodes pull from cached render results to maintain UI responsiveness.
- Real-Time Recomputation: If a parameter on an existing filter is tweaked, only the affected node and its downstream dependents are invalidated and recalculated; the raw base image is never reloaded or destructively transformed.
Serialization in the XCF File Format
To ensure that live filter stacks persist between user sessions, GIMP 3.0 updates the XCF file specification.
When saving an image, GIMP serializes the
GimpDrawableFilter stack as layer properties alongside
standard metadata like layer masks and opacity. The file format records
the GEGL operation name (such as gegl:gaussian-blur), its
operational order in the stack, its individual blend settings, and the
exact string or numeric values for all exposed properties.
When the XCF file is reopened, GIMP reads these properties, reconstructs the GEGL node graph above the source pixel buffer, and resumes live, non-destructive editing without any quality loss.