-
Notifications
You must be signed in to change notification settings - Fork 6
/
FakeDithering.cs
34 lines (29 loc) · 922 Bytes
/
FakeDithering.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
This file implements fake dithering, meaning NO dithering is done.
This is free and unencumbered software released into the public domain.
*/
using System;
/// <summary>
/// Fake dithering doesn't do any dithering. It only does color reduction
/// </summary>
public sealed class FakeDitheringRGBByte : DitheringBase<byte>
{
/// <summary>
/// Constructor for fake dithering (no dither, just color reduction)
/// </summary>
/// <param name="colorfunc"></param>
/// <returns></returns>
public FakeDitheringRGBByte(ColorFunction colorfunc) : base(colorfunc, "No dithering", "_NONE")
{
}
/// <summary>
/// Push error method for Fake dithering
/// </summary>
/// <param name="x">X coordinate</param>
/// <param name="y">Y coordinate</param>
/// <param name="quantError">Quantization error</param>
override protected void PushError(int x, int y, double[] quantError)
{
// Don't do anything
}
}