Pinta.ImageManipulation.Effects.BrightnessContrastEffect.BrightnessContrastEffect C# (CSharp) Method

BrightnessContrastEffect() public method

Creates a new effect that will adjust the brightness and contrast of an image.
public BrightnessContrastEffect ( int brightness, int contrast ) : System
brightness int Desired brightness of the image. Valid range is -100 - 100.
contrast int Desired contrast of the image. Valid range is -100 - 100.
return System
		public BrightnessContrastEffect (int brightness = 0, int contrast = 0)
		{
			if (brightness < -100 || brightness > 100)
				throw new ArgumentOutOfRangeException ("brightness");
			if (contrast < -100 || contrast > 100)
				throw new ArgumentOutOfRangeException ("contrast");

			this.brightness = brightness;
			this.contrast = contrast;

			Calculate ();
		}