[−][src]Function raster::filter::saturation
pub fn saturation(src: &mut Image, sat: f32) -> RasterResult<()>
Change saturation.
Pass a float value for sat. < 0.0 to decrease and > 0.0 to increase. Eg 0.5 for 50% increase in saturation.
Note: Saturation does not look good at the moment.
Examples
use raster::filter; // Create image from file let mut image = raster::open("tests/in/sample.png").unwrap(); filter::saturation(&mut image, 0.5).unwrap(); raster::save(&image, "tests/out/test_filter_saturation.jpg").unwrap();