Method AdjustTone
AdjustTone(ToneAdjustments)
Applies the photographic adjustment set (exposure, brightness, contrast, highlights, shadows, saturation, sharpness) and returns the result as a new ImageBuffer. The source is never modified.
public ImageBuffer AdjustTone(ImageBuffer.ToneAdjustments adjustments)
Parameters
adjustmentsImageBuffer.ToneAdjustmentsThe settings to apply; neutral settings return an unmodified copy.
Returns
- ImageBuffer
A new ImageBuffer holding the adjusted image.
Remarks
The engine is deterministic and built for speed: exposure, brightness and contrast compose into ONE 256-entry lookup table; highlights and shadows become a pair of luma-indexed affine tables; saturation pivots on each pixel's own luma. All of it runs in a single pass over the pixels. Sharpness, when requested, adds one separable 3x3 unsharp pass that leaves flat areas byte-exact.
RGB24 and RGBA32 sources keep their format (alpha, when present, passes through untouched); any other format is first converted to RGBA32.
Exceptions
- ArgumentNullException
Thrown when
adjustmentsis null.- ObjectDisposedException
Thrown if this instance has been disposed.