Skip to main content

Module image

Module image 

Source
Expand description

Image editing — layers, brushes, selection, filters, masks, colour, vector.

~40 required functions. This module provides the data structures and deterministic operations for image editing.

Structs§

BrushStroke
A brush stroke — sequence of points with size and colour.
FilterPlan
ImageDocument
An image document with multiple layers.
ImageLayer
A layer in an image document.
ImageLimits
Selection
A selection region.

Enums§

BlendMode
Blend mode for layer compositing.
ImageError
ImageFilter
Image filter type.
ImageFilterOp
SelectionShape

Functions§

apply_filter
Legacy normalized-intensity convenience operation on a valid bounded layer. Completed mappings: blur sigma=4i; sharpen sigma=1/amount=i; hue=360i degrees; emboss azimuth=135 degrees/strength=i. Other operations retain their established semantics. Use try_apply_image_filter for typed, fallible edits. Panics on malformed/out-of-budget input for the four completed mappings.
composite_into
Compose into caller-owned storage. Every refusal occurs before the first write.
filter_plan
Check dimensions, parameters, work, and resident buffer budget without allocating.
filter_rgba8_into
Filter into caller-owned output. Every error is returned before output changes.
try_apply_image_filter
Cold checked adapter. All admission precedes allocation and source mutation.
validate_document
Validate the complete source, including hidden layers, before writing output. Returns the exact number of document pixels required in the caller buffer.