browser-image
    Preparing search index...

    Variable presetsConst

    presets: Readonly<Record<PresetName, Pipeline>> = ...

    Built-in corrections:

    • auto: automatic stretch per channel (0.5 % clipped at each end, which also removes color casts) and light sharpening. What autoEnhance runs.
    • vivid: auto with more contrast and saturation.
    • soft: lifted shadows, calmer highlights, less contrast and a little warmth.
    • satellite: a stronger stretch (2 % clipped) for hazy aerial and satellite imagery, with sharpening.
    • document: for photographed pages: one stretch for all channels that pushes the paper to white, more contrast and crisp sharpening.
    • blackAndWhite: stretch, then monochrome with a little extra contrast.
    const out = await presets.vivid.run(img, { output: 'canvas' });
    editor.render(presets.soft.set('shadows', 0.6)); // a preset as a starting point