Saturation adjusting in HSL color space.

The filter operates in HSL color space and adjusts pixels' saturation value, increasing it or decreasing by specified percentage. The filters is based on HSLLinear filter, passing work to it after recalculating saturation adjust value to input/output ranges of the HSLLinear filter.

The filter accepts 24 and 32 bpp color images for processing.

Sample usage:

// create filter SaturationCorrection filter = new SaturationCorrection( -0.5f ); // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

Inheritance: BaseInPlacePartialFilter
Example #1
0
 private void SetFilter()
 {
     ImageType = ImageTypes.Rgb32bpp;
     Af.SaturationCorrection newFilter = new Af.SaturationCorrection();
     newFilter.AdjustValue = (float)Remap(adjust, -1.0, 1.0);
     imageFilter           = newFilter;
 }