Browse Source

Fix terniary

pull/106/head
James Jackson-South 9 years ago
parent
commit
c41d95068a
  1. 2
      src/ImageSharp/Dithering/Ordered/Bayer.cs
  2. 2
      src/ImageSharp/Dithering/Ordered/Ordered.cs

2
src/ImageSharp/Dithering/Ordered/Bayer.cs

@ -32,7 +32,7 @@ namespace ImageSharp.Dithering.Ordered
where TColor : struct, IPackedPixel, IEquatable<TColor> where TColor : struct, IPackedPixel, IEquatable<TColor>
{ {
source.ToXyzwBytes(bytes, 0); source.ToXyzwBytes(bytes, 0);
pixels[x, y] = ThresholdMatrix[x % 3, y % 3] >= bytes[index] ? upper : lower; pixels[x, y] = ThresholdMatrix[x % 3, y % 3] >= bytes[index] ? lower : upper;
} }
} }
} }

2
src/ImageSharp/Dithering/Ordered/Ordered.cs

@ -32,7 +32,7 @@ namespace ImageSharp.Dithering.Ordered
where TColor : struct, IPackedPixel, IEquatable<TColor> where TColor : struct, IPackedPixel, IEquatable<TColor>
{ {
source.ToXyzwBytes(bytes, 0); source.ToXyzwBytes(bytes, 0);
pixels[x, y] = ThresholdMatrix[x % 3, y % 3] >= bytes[index] ? upper : lower; pixels[x, y] = ThresholdMatrix[x % 3, y % 3] >= bytes[index] ? lower : upper;
} }
} }
} }
Loading…
Cancel
Save