Quote:
Originally Posted by geekmaster
You just change the cutoffs in the dither table, so no active code changes. Or, you could scale and offset the numbers before dithering.
|
Dither errors resulting in no pure black or no pure white are usually scaling error. Dither always gives power of two PLUS ONE, or 65 shades of gray (0-64) for an 8x8 table. It is easy to assume 0-63 incorrectly...
Or it could be integer round-off error. When doing fixed-point math, you need to add half the divisor to the numerator before dividing. In dithering a 6-bit value, that would put the "error in the middle (value 32) instead of at white or black.