diff --git a/Image Processing Studio 1.0/ImageProcessor.cs b/Image Processing Studio 1.0/ImageProcessor.cs index 03cecbb..51cac24 100644 --- a/Image Processing Studio 1.0/ImageProcessor.cs +++ b/Image Processing Studio 1.0/ImageProcessor.cs @@ -211,6 +211,16 @@ public static UMat getColorTemperatureAdjusted(ref UMat img, int r, int g, int b public static void PaintVignette(Graphics g, Rectangle bounds, int radi, int intense) { + int red = 0; + int green = 0; + int blue = 0; + if (intense < 0) + { + intense = -intense; + red = 255; + green = 255; + blue = 255; + } Rectangle ellipsebounds = bounds; ellipsebounds.Offset(-ellipsebounds.X, -ellipsebounds.Y); int x = ellipsebounds.Width - (int)Math.Round((radi * ellipsebounds.Width)/10.0); @@ -224,7 +234,7 @@ public static void PaintVignette(Graphics g, Rectangle bounds, int radi, int int { brush.WrapMode = WrapMode.Tile; brush.CenterColor = Color.FromArgb(0, 0, 0, 0); - brush.SurroundColors = new Color[] { Color.FromArgb(intense, 0, 0, 0) }; + brush.SurroundColors = new Color[] { Color.FromArgb(intense, red, green, blue) }; Blend blend = new Blend(); blend.Positions = new float[] { 0.0f, 0.2f, 0.4f, 0.6f, 0.8f, 1.0F }; blend.Factors = new float[] { 0.0f, 0.5f, 1f, 1f, 1.0f, 1.0f }; diff --git a/Image Processing Studio 1.0/Vignette.cs b/Image Processing Studio 1.0/Vignette.cs index 1534fe9..8742c24 100644 --- a/Image Processing Studio 1.0/Vignette.cs +++ b/Image Processing Studio 1.0/Vignette.cs @@ -18,7 +18,7 @@ public partial class Vignette : UserControl private const double MIN_RAD = 5.0; private const double MAX_RAD = 9.0; - private const double MIN_INTENSITY = 100.0; + private const double MIN_INTENSITY = -255.0; private const double MAX_INTENSITY = 255.0; private const double DEFAULT_RAD = 7.0; private const double DEFAULT_INTENSITY = 200.0;