Browse Source

Removed unnecessary parenthesis.

af/merge-core
dirk 9 years ago
parent
commit
320fb94dca
  1. 6
      src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs
  2. 2
      src/ImageSharp/Formats/Png/Zlib/ZlibDeflateStream.cs
  3. 2
      src/ImageSharp/Samplers/Processors/OilPaintingProcessor.cs

6
src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs

@ -290,7 +290,7 @@ namespace ImageSharp.Formats
byte g = (byte)(((temp & Rgb16GMask) >> 5) * ScaleG); byte g = (byte)(((temp & Rgb16GMask) >> 5) * ScaleG);
byte b = (byte)((temp & Rgb16BMask) * ScaleR); byte b = (byte)((temp & Rgb16BMask) * ScaleR);
int arrayOffset = ((row * width) + x); int arrayOffset = (row * width) + x;
// Stored in b-> g-> r order. // Stored in b-> g-> r order.
TColor packed = default(TColor); TColor packed = default(TColor);
@ -330,7 +330,7 @@ namespace ImageSharp.Formats
for (int x = 0; x < width; x++) for (int x = 0; x < width; x++)
{ {
int offset = rowOffset + (x * 3); int offset = rowOffset + (x * 3);
int arrayOffset = ((row * width) + x); int arrayOffset = (row * width) + x;
// Stored in b-> g-> r-> a order. // Stored in b-> g-> r-> a order.
TColor packed = default(TColor); TColor packed = default(TColor);
@ -370,7 +370,7 @@ namespace ImageSharp.Formats
for (int x = 0; x < width; x++) for (int x = 0; x < width; x++)
{ {
int offset = rowOffset + (x * 4); int offset = rowOffset + (x * 4);
int arrayOffset = ((row * width) + x); int arrayOffset = (row * width) + x;
// Stored in b-> g-> r-> a order. // Stored in b-> g-> r-> a order.
TColor packed = default(TColor); TColor packed = default(TColor);

2
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 >> 24) & 0xFF));
this.rawStream.WriteByte((byte)((crc >> 16) & 0xFF)); this.rawStream.WriteByte((byte)((crc >> 16) & 0xFF));
this.rawStream.WriteByte((byte)((crc >> 8) & 0xFF)); this.rawStream.WriteByte((byte)((crc >> 8) & 0xFF));
this.rawStream.WriteByte((byte)((crc) & 0xFF)); this.rawStream.WriteByte((byte)(crc & 0xFF));
} }
base.Dispose(disposing); base.Dispose(disposing);

2
src/ImageSharp/Samplers/Processors/OilPaintingProcessor.cs

@ -119,7 +119,7 @@ namespace ImageSharp.Processors
float sourceBlue = color.Z; float sourceBlue = color.Z;
float sourceGreen = color.Y; 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; intensityBin[currentIntensity] += 1;
blueBin[currentIntensity] += sourceBlue; blueBin[currentIntensity] += sourceBlue;

Loading…
Cancel
Save