ff2col - ff2txt - farbfeld image to plain text visualization
(HTM) git clone git://bitreich.org/ff2txt git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/ff2txt
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
---
(DIR) commit 0618ea49eedccf14ae19e93f9e8ec1ffd43daa44
(DIR) parent a1eea6f23b8947751165e1909fd387803c7a803e
(HTM) Author: Josuah Demangeon <mail@josuah.net>
Date: Mon, 29 Jan 2018 08:35:02 +0100
ff2col
Diffstat:
M ff2col.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
(DIR) 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');
}