browser-image
    Preparing search index...
    OpSpec:
        | { op: "brightness"; amount: number }
        | { op: "contrast"; amount: number }
        | { op: "exposure"; ev: number }
        | { op: "gamma"; gamma: number }
        | { op: "saturation"; amount: number }
        | { op: "temperature"; amount: number }
        | { op: "tint"; amount: number }
        | { op: "whiteBalance" } & Required<WhiteBalanceOptions>
        | { op: "shadows"; amount: number }
        | { op: "highlights"; amount: number }
        | {
            op: "curve";
            points: CurvePoint[];
            red: CurvePoint[];
            green: CurvePoint[];
            blue: CurvePoint[];
        }
        | { op: "levels" } & Required<LevelsOptions>
        | { op: "stretch"; black: RGBValues; white: RGBValues }
        | { op: "autoStretch" } & Required<AutoStretchOptions>
        | { op: "sharpen" } & Required<SharpenOptions>

    A single correction step in serializable form.

    Type Declaration

    • { op: "brightness"; amount: number }
      • op: "brightness"
      • amount: number

        -1 to 1.

    • { op: "contrast"; amount: number }
      • op: "contrast"
      • amount: number

        -1 to 1.

    • { op: "exposure"; ev: number }
      • op: "exposure"
      • ev: number

        Exposure in EV stops, -10 to 10.

    • { op: "gamma"; gamma: number }
      • op: "gamma"
      • gamma: number

        Gamma, 0.1 to 10. Above 1 brightens midtones.

    • { op: "saturation"; amount: number }
      • op: "saturation"
      • amount: number

        -1 (grayscale) to 1 (double).

    • { op: "temperature"; amount: number }
      • op: "temperature"
      • amount: number

        -1 (cooler/bluer) to 1 (warmer/yellower).

    • { op: "tint"; amount: number }
      • op: "tint"
      • amount: number

        -1 (greener) to 1 (more magenta).

    • { op: "whiteBalance" } & Required<WhiteBalanceOptions>
    • { op: "shadows"; amount: number }
      • op: "shadows"
      • amount: number

        -1 (darker shadows) to 1 (lifted shadows).

    • { op: "highlights"; amount: number }
      • op: "highlights"
      • amount: number

        -1 (recovered, darker highlights) to 1 (brighter highlights).

    • {
          op: "curve";
          points: CurvePoint[];
          red: CurvePoint[];
          green: CurvePoint[];
          blue: CurvePoint[];
      }
      • op: "curve"
      • points: CurvePoint[]

        Curve for all channels, sorted, from input 0 to 1.

      • red: CurvePoint[]

        Red curve, applied after points.

      • green: CurvePoint[]

        Green curve, applied after points.

      • blue: CurvePoint[]

        Blue curve, applied after points.

    • { op: "levels" } & Required<LevelsOptions>
    • { op: "stretch"; black: RGBValues; white: RGBValues }
      • op: "stretch"
      • black: RGBValues

        Per-channel input value that becomes black.

      • white: RGBValues

        Per-channel input value that becomes white.

    • { op: "autoStretch" } & Required<AutoStretchOptions>

      Replaced by a stretch computed from the image's statistics before it runs.

    • { op: "sharpen" } & Required<SharpenOptions>

      Unsharp mask. Unlike the other steps it looks at neighbouring pixels.