mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
CLAHE provides adaptive local contrast, normalise stretches the histogram, and gamma adjusts exposure perceptually. Replaces the old modulate/linear pipeline that compounded errors and darkened images. Preset multipliers now include clahe and normalise entries. Key fixes beyond the spec: - maxSlope rounded to integer (Sharp requirement) - White balance uses linear() instead of recomb() to avoid float-cast that breaks CLAHE in the libvips pipeline - CLAHE tile size adapts to image dimensions (1x1 for tiny images) - Gamma clamped to Sharp's valid range (1.0-3.0) - Normalise lower/upper correctly mapped to percentile cutoffs