diff --git a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs index 9198d443c..8aa2c3441 100644 --- a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs +++ b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs @@ -290,7 +290,7 @@ namespace ImageSharp.Formats byte g = (byte)(((temp & Rgb16GMask) >> 5) * ScaleG); byte b = (byte)((temp & Rgb16BMask) * ScaleR); - int arrayOffset = ((row * width) + x); + int arrayOffset = (row * width) + x; // Stored in b-> g-> r order. TColor packed = default(TColor); @@ -330,7 +330,7 @@ namespace ImageSharp.Formats for (int x = 0; x < width; x++) { int offset = rowOffset + (x * 3); - int arrayOffset = ((row * width) + x); + int arrayOffset = (row * width) + x; // Stored in b-> g-> r-> a order. TColor packed = default(TColor); @@ -370,7 +370,7 @@ namespace ImageSharp.Formats for (int x = 0; x < width; x++) { int offset = rowOffset + (x * 4); - int arrayOffset = ((row * width) + x); + int arrayOffset = (row * width) + x; // Stored in b-> g-> r-> a order. TColor packed = default(TColor); diff --git a/src/ImageSharp/Formats/Png/Zlib/ZlibDeflateStream.cs b/src/ImageSharp/Formats/Png/Zlib/ZlibDeflateStream.cs index 35e8b025d..e411396d0 100644 --- a/src/ImageSharp/Formats/Png/Zlib/ZlibDeflateStream.cs +++ b/src/ImageSharp/Formats/Png/Zlib/ZlibDeflateStream.cs @@ -196,7 +196,7 @@ namespace ImageSharp.Formats this.rawStream.WriteByte((byte)((crc >> 24) & 0xFF)); this.rawStream.WriteByte((byte)((crc >> 16) & 0xFF)); this.rawStream.WriteByte((byte)((crc >> 8) & 0xFF)); - this.rawStream.WriteByte((byte)((crc) & 0xFF)); + this.rawStream.WriteByte((byte)(crc & 0xFF)); } base.Dispose(disposing); diff --git a/src/ImageSharp/Samplers/Processors/OilPaintingProcessor.cs b/src/ImageSharp/Samplers/Processors/OilPaintingProcessor.cs index 9d0c2f58a..35406afab 100644 --- a/src/ImageSharp/Samplers/Processors/OilPaintingProcessor.cs +++ b/src/ImageSharp/Samplers/Processors/OilPaintingProcessor.cs @@ -119,7 +119,7 @@ namespace ImageSharp.Processors float sourceBlue = color.Z; float sourceGreen = color.Y; - int currentIntensity = (int)Math.Round(((sourceBlue + sourceGreen + sourceRed) / 3.0 * (levels - 1))); + int currentIntensity = (int)Math.Round((sourceBlue + sourceGreen + sourceRed) / 3.0 * (levels - 1)); intensityBin[currentIntensity] += 1; blueBin[currentIntensity] += sourceBlue;