xcfkit_compression library
Optional whole-file envelopes, separate from XCF's per-tile compression.
Importing xcfkit.dart alone does not pull these envelope codecs into a build.
This convenience API is bounded but in-memory; unwrap large files to a
temporary seekable file before opening them lazily.
Classes
- XcfChannel
- A saved channel, selection, layer mask, or effect mask.
- XcfCodec
- Reads and writes complete XCF documents, including original sample values.
- XcfColor
- A serialized GIMP color retaining its Babl encoding, pixel and ICC profile.
- XcfConfiguration
- Structured GimpConfig with bounded nesting and source-preserving edits.
- XcfConfigValue
- One GimpConfig token or nested list, preserving its exact original spelling.
- XcfControlPoint
- A path control point, including optional tablet axes.
- XcfCurve
- Typed GimpCurve configuration with control points and its saved sample table.
- XcfCurvePoint
- One serialized curve control point, including inactive legacy points.
- XcfDocument
- An XCF image with a flat, top-first layer list and explicit group paths.
- XcfDocumentCodec
-
A standard
dart:convertcodec with document-to-byte encoding direction. - XcfEffect
- A serialized GEGL effect and its arguments, without a rendering engine.
- XcfFilterArgument
- A GEGL argument with its original type and bytes retained.
- XcfFloatingSelection
- Portable attachment of a floating layer, independent of file offsets.
- XcfGradient
- An embedded gradient argument, independent of GIMP's installed resources.
- XcfGradientSegment
- One segment of a serialized GIMP gradient; no interpolation is performed.
- XcfGuide
- A document guide, including off-canvas positions and unknown orientations.
- XcfInput
- Random-access input for XCF metadata and individual compressed tiles.
- XcfLayer
- One layer or group; original metadata remains available in properties.
- XcfLayerLink
- External-layer metadata, never resolved or opened by XcfKit.
- XcfLayerNode
- One node of a reconstructed layer tree.
- XcfLayerTransform
- A linked layer's transform, retained as metadata without resampling pixels.
- XcfMemoryInput
- Byte-array input; callers must not mutate the array during lazy access.
- XcfOutput
- Seekable output receiving bounded chunks with synchronous backpressure.
- XcfParasite
- Named application metadata, such as an ICC profile or editable text.
- XcfPath
- Editable path geometry with uninterpreted item metadata retained.
- XcfPixels
- Pixel access without applying ICC transforms, masks, opacity, or effects.
- XcfProperty
- A typed property envelope with its uninterpreted payload preserved.
- XcfPropertyId
- Frequently used XCF property identifiers; unknown identifiers stay numeric.
- XcfRaster
- A rectangular array of interleaved, straight-alpha sample bytes.
- XcfReadOptions
- Resource limits applied before allocating buffers or following structures.
- XcfResolution
- Independent horizontal and vertical print resolution in pixels per inch.
- XcfResourceReference
- Identifier of a GIMP resource; the resource itself is not embedded here.
- XcfSamplePoint
- Color sampling marker, retaining future sampling modes and reserved words.
- XcfStroke
- An ordered Bézier stroke with explicit anchor and handle records.
- XcfText
- Editable GIMP text configuration, with unknown fields preserved verbatim.
- XcfTextBox
- Text-box geometry; dimensions retain their declared GIMP unit.
- XcfTextColor
- A text color in either legacy numeric sRGB or modern encoded form.
- XcfTextContent
- Editable text contents, analogous to the semantic text models of other kits.
- XcfTextFont
- A font reference retaining modern resource identifiers and unknown fields.
- XcfTextOptions
- Source-preserving text settings; missing fields expose GIMP's defaults.
- XcfTextOutline
- Source-preserving contour metadata; rasterization belongs to the host.
- XcfTextSpan
- One inline Pango element, retaining attributes unknown to the host adapter.
- XcfTextStyle
- An inline style with its full outer-to-inner nesting retained.
- XcfTextStyleRun
- A UTF-16 range sharing one inline style, matching Dart String indexing.
- XcfTextTransform
- Text's 2×2 transformation and separate layout offsets.
- XcfUserUnit
- Custom physical unit, including pre-XCF-21 singular and plural labels.
- XcfVector
- A self-contained modern vector payload, preserved without interpretation.
- XcfVectorLayer
- Editable XCF 24 vector-layer metadata and its path tattoo reference.
- XcfVectorPaint
- Vector fill or stroke paint, retaining GIMP's numeric style identifiers.
- XcfWrappedCodec
- Bounded, checksum-verified whole-file XCF envelope support.
- XcfWriteDiagnostic
- One actionable preflight finding with a stable code and document location.
- XcfWriteOptions
- Configuration for a complete in-memory XCF write.
- XcfWriteReport
- Static compatibility report produced without decoding or compressing pixels.
Enums
- XcfColorMode
- Image-wide color model.
- XcfCompression
- Compression applied independently to each pixel tile.
- XcfDiagnosticSeverity
- Severity of a static write diagnostic.
- XcfDrawableKind
- Kind of drawable receiving a floating selection.
- XcfEnvelope
- Optional outer envelope, identified by signature rather than filename.
- XcfLayerType
- Per-layer component layout; samples are interleaved, alpha is last.
- XcfPrecision
- Storage of each color or alpha component, independent of its color profile.
Extensions
- XcfDocumentMetadata on XcfDocument
- Typed document metadata with raw property preservation for unrelated fields.
- XcfDocumentPaths on XcfDocument
- Typed access to all three generations of XCF vector paths.
- XcfEffectArguments on XcfEffect
- Named argument access without losing opaque effect properties.
- XcfLayerText on XcfLayer
- Text access and cache-aware editing for raster layers.
- XcfLayerVector on XcfLayer
- Typed access to vector metadata alongside the independent saved raster.
- XcfLinkedLayerMetadata on XcfLayer
- Typed access to link metadata while the layer's raster stays available.
-
XcfPropertyAccess
on List<
XcfProperty> - Accessors which follow GIMP's last-value-wins rule for scalar properties.
Exceptions / Errors
- XcfFormatException
- A malformed XCF structure or an exceeded decoding limit.
- XcfUnsupportedException
- A valid feature which this codec or operation cannot safely handle.