Pixels of context the pipeline needs around each part of a picture: when
a tile is run with this many pixels of its neighbours on every side (and
the margin is cropped off afterwards), it matches the same area of the
whole picture run at once, so tile seams cannot show. 0 unless the
pipeline has sharpen steps.
True when no step changes the image (an empty pipeline, or every step at its neutral value).
True when the pipeline has autoStretch steps that still need statistics.
StaticfromRestores a pipeline saved with toJSON() (object or JSON string).
Color temperature, -1 (cool) to 1 (warm). No effect on monochrome images.
Tint, -1 (green) to 1 (magenta): the color axis temperature does not cover. No effect on monochrome images.
White balance from a gray point: gray is the color (sRGB-encoded, 0-1)
of something that should be neutral, for example from sampleColor on the
image. Put it first so it sees the colors of the original image. No effect
on monochrome images.
Shadows, -1 (darker) to 1 (lifted): moves dark tones, leaving black, white and highlights almost unchanged.
Highlights, -1 (recovered, darker) to 1 (brighter): moves light tones, leaving black, white and shadows almost unchanged.
Tone curve (see CurveOptions): points [input, output] on the
sRGB 0-1 scale joined by a smooth curve, for all channels and per channel.
Stretches the range black..white (sRGB-encoded, one number or [R, G, B]) to full black..white.
Automatic stretch (dynamic range adjustment). The range comes from the
pixel distribution of the image as it reaches this step, ignoring
transparent pixels. run takes the statistics from the image it is given;
for tiles, collect statistics over the area you show and call resolve.
Optionaloptions: AutoStretchOptionsSharpens with an unsharp mask (see SharpenOptions). Run on its own image, the result is the same whether or not it is split across workers. For tiles of a larger picture, give each tile Pipeline.margin pixels of its neighbours so the tile edges do not show.
Optionaloptions: SharpenOptionsReturns a pipeline with step op set to params: the first step of that
kind is updated in place (parameters not given keep their values), or the
step is appended when the pipeline has none. Made for controls: each
slider sets its own step without rebuilding the chain.
Steps with one main value (brightness, contrast, exposure, gamma,
saturation, temperature, sharpen, ...) also take that value as a number;
OpInfo.value names it.
The first step of kind op, with its normalized parameters, or undefined when there is none.
Returns a pipeline without any step of kind op.
The same correction for the image shrunk by factor (0.5 = half the
width and height): pixel distances (the sharpen radius) are scaled with
it, so a preview on a smaller copy looks like the full-size result.
Returns a pipeline with every autoStretch replaced by a fixed stretch
computed from stats, the histogram of the image (or of the area of a
tiled image) it will run on. Every image run through the result gets the
same range. With null, autoStretch steps are removed.
Serializable form of the steps, for saving presets. Restore with Pipeline.fromJSON.
Runs synchronously on the calling thread.
Runs on any supported input and returns the requested output type.
Optionaloptions: O
An immutable chain of corrections. Each method returns a new pipeline with one more step;
run()applies all steps in one pass in linear light, so no precision is lost to 8-bit rounding between steps.Example