ff2txt

display a farbfeld(5)-formatted image as braille or ascii text
Log | Files | Refs | README

commit 0618ea49eedccf14ae19e93f9e8ec1ffd43daa44
parent a1eea6f23b8947751165e1909fd387803c7a803e
Author: Josuah Demangeon <mail@josuah.net>
Date:   Mon, 29 Jan 2018 08:35:02 +0100

ff2col

Diffstat:
Mff2col.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ff2col.c b/ff2col.c @@ -12,10 +12,10 @@ print_2_rows(struct col *buf, uint32_t width, int height) int up, dn; char *map = " '.:"; - for (w = 0; w < width; w += 2) { + for (w = 0; w < width; w++) { up = height > 0 && is_bright(buf[w]) ? 0x1 : 0x0; dn = height > 1 && is_bright(buf[w + width]) ? 0x2 : 0x0; - putchar(map[up & dn]); + putchar(map[up | dn]); } putchar('\n'); }