377 |
to any point in the update box * (zero if color is within update |
to any point in the update box * (zero if color is within update |
378 |
box); * 2. its maximum squared-distance to any point in the update |
box); * 2. its maximum squared-distance to any point in the update |
379 |
box. * Both of these can be found by considering only the corners of |
box. * Both of these can be found by considering only the corners of |
380 |
the box. * We save the minimum distance for each color in mindist[]; * |
the box. * We save the minimum distance for each color in mindist[]; * |
381 |
|
|
382 |
|
|
383 |
|
|
760 |
cur2 -= colormap2[pixcode]; |
cur2 -= colormap2[pixcode]; |
761 |
} |
} |
762 |
|
|
763 |
/* Compute error fractions to be propagated to adjacent pixels. * |
/* Compute error fractions to be propagated to adjacent pixels. * |
764 |
Add these into the running sums, and simultaneously shift the |
Add these into the running sums, and simultaneously shift the |
765 |
* next-line error sums left by 1 column. */ |
* next-line error sums left by 1 column. */ |
766 |
{ |
{ |
794 |
|
|
795 |
/* At this point curN contains the 7/16 error value to be |
/* At this point curN contains the 7/16 error value to be |
796 |
propagated * to the next pixel on the current line, and all |
propagated * to the next pixel on the current line, and all |
797 |
the errors for the * next line have been shifted over. We are |
the errors for the * next line have been shifted over. We are |
798 |
therefore ready to move on. */ |
therefore ready to move on. */ |
799 |
r += dir; |
r += dir; |
800 |
g += dir; |
g += dir; |