Description: Below we give Floyd-Steinberg algorithm source code. One thing to note, our original procedures described are the first to open a buffer of type char is used to store the new map data, but in this algorithm, since e may be negative, in order to prevent the resulting value exceeds the char can be expressed range, we used a type int buffer to store the new value. In addition, when left to right, top to bottom in the order processing pixel, the processed pixel will be no longer used, so use this type int buffer to store the new value is feasible. All pixels dealt with, then these values are copied into the buffer to the char type.
To Search:
File list (Check if you may need any files):
R.txt