diff --git a/src/ImageProcessor/Colors/Color.cs b/src/ImageProcessor/Colors/Color.cs
index 58bfd4040..4b13fb1dd 100644
--- a/src/ImageProcessor/Colors/Color.cs
+++ b/src/ImageProcessor/Colors/Color.cs
@@ -62,9 +62,9 @@ namespace ImageProcessor
public bool IsEmpty => this.backingVector.Equals(default(Vector4));
///
- /// Gets or sets the blue component of the color.
+ /// Gets or sets the red component of the color.
///
- public float B
+ public float R
{
get
{
@@ -94,9 +94,9 @@ namespace ImageProcessor
}
///
- /// Gets or sets the red component of the color.
+ /// Gets or sets the blue component of the color.
///
- public float R
+ public float B
{
get
{
diff --git a/src/ImageProcessor/ImageBase.cs b/src/ImageProcessor/ImageBase.cs
index 805ee76d0..5e1aaa1a6 100644
--- a/src/ImageProcessor/ImageBase.cs
+++ b/src/ImageProcessor/ImageBase.cs
@@ -163,6 +163,7 @@ namespace ImageProcessor
///
public void SetPixels(int width, int height, float[] pixels)
{
+#if DEBUG
if (width <= 0)
{
throw new ArgumentOutOfRangeException(nameof(width), "Width must be greater than or equals than zero.");
@@ -177,7 +178,7 @@ namespace ImageProcessor
{
throw new ArgumentException("Pixel array must have the length of Width * Height * 4.");
}
-
+#endif
this.Width = width;
this.Height = height;
this.Pixels = pixels;
diff --git a/src/ImageProcessor/Samplers/Resize.cs b/src/ImageProcessor/Samplers/Resize.cs
index c1751ff3e..b63e54bcf 100644
--- a/src/ImageProcessor/Samplers/Resize.cs
+++ b/src/ImageProcessor/Samplers/Resize.cs
@@ -1,6 +1,6 @@
//
-// Copyright (c) James South and contributors
-// Licensed under the Apache License, Version 2.0. license.
+// Copyright (c) James South and contributors.
+// Licensed under the Apache License, Version 2.0.
//
namespace ImageProcessor.Samplers
@@ -97,8 +97,7 @@ namespace ImageProcessor.Samplers
}
int originX = xw.Index;
- Color sourceColor = source[originX, originY];
- sourceColor = PixelOperations.ToLinear(sourceColor);
+ Color sourceColor = PixelOperations.ToLinear(source[originX, originY]);
float weight = (yw.Value / verticalSum) * (xw.Value / horizontalSum);
diff --git a/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs b/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs
index d7e0c58db..7f9e8ccc6 100644
--- a/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs
+++ b/tests/ImageProcessor.Tests/Processors/ProcessorTestBase.cs
@@ -29,8 +29,8 @@ namespace ImageProcessor.Tests
"../../TestImages/Formats/Png/splash.png",
"../../TestImages/Formats/Gif/leaf.gif",
"../../TestImages/Formats/Gif/rings.gif",
- "../../TestImages/Formats/Gif/ani2.gif" ,
- "../../TestImages/Formats/Gif/giphy.gif"
+ "../../TestImages/Formats/Gif/ani2.gif",
+ "../../TestImages/Formats/Gif/giphy.gif"
};
}
}