|
|
@@ -808,6 +808,7 @@ int cucul_dither_bitmap(cucul_canvas_t *cv, int x, int y, int w, int h, |
|
|
|
cucul_dither_t const *d, void *pixels) |
|
|
|
{ |
|
|
|
int *floyd_steinberg, *fs_r, *fs_g, *fs_b; |
|
|
|
uint32_t savedattr; |
|
|
|
int fs_length; |
|
|
|
int x1, y1, x2, y2, pitch, deltax, deltay; |
|
|
|
unsigned int dchmax; |
|
|
@@ -815,6 +816,8 @@ int cucul_dither_bitmap(cucul_canvas_t *cv, int x, int y, int w, int h, |
|
|
|
if(!d || !pixels) |
|
|
|
return 0; |
|
|
|
|
|
|
|
savedattr = cucul_get_attr(cv, -1, -1); |
|
|
|
|
|
|
|
x1 = x; x2 = x + w - 1; |
|
|
|
y1 = y; y2 = y + h - 1; |
|
|
|
|
|
|
@@ -1036,13 +1039,15 @@ int cucul_dither_bitmap(cucul_canvas_t *cv, int x, int y, int w, int h, |
|
|
|
cucul_set_color_ansi(cv, outfg, outbg); |
|
|
|
cucul_put_char(cv, x, y, outch); |
|
|
|
|
|
|
|
d->increment_dither(); |
|
|
|
d->increment_dither(); |
|
|
|
} |
|
|
|
/* end loop */ |
|
|
|
} |
|
|
|
|
|
|
|
free(floyd_steinberg); |
|
|
|
|
|
|
|
cucul_set_attr(cv, savedattr); |
|
|
|
|
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|