From feab0ef0aa8ab0db7419520e98b48ef4dc15f5bb Mon Sep 17 00:00:00 2001 From: alxf Date: Mon, 2 Oct 2017 01:15:19 +0200 Subject: [PATCH 1/2] Fix usage example typo --- python/examples/img2txt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/examples/img2txt.py b/python/examples/img2txt.py index 6cec52e..a7e95db 100755 --- a/python/examples/img2txt.py +++ b/python/examples/img2txt.py @@ -35,7 +35,7 @@ DEPTH = 4 HELP_MSG = """\ Usage: %s [OPTIONS]... Convert IMAGE to any text based available format. -Example: %s -w 80 -f ansi ./caca.png +Example: %s -W 80 -f ansi ./caca.png Options: -h, --help This help From cc8481c50cc304d8086c430e2ea1628806cfefb0 Mon Sep 17 00:00:00 2001 From: alxf Date: Mon, 2 Oct 2017 01:16:54 +0200 Subject: [PATCH 2/2] Fix deprecated call to pil method --- python/examples/img2txt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/examples/img2txt.py b/python/examples/img2txt.py index a7e95db..dbee097 100755 --- a/python/examples/img2txt.py +++ b/python/examples/img2txt.py @@ -224,7 +224,7 @@ def main(): dit.set_charset(charset) #create dither - dit.bitmap(cv, 0, 0, width, height, img.tostring()) + dit.bitmap(cv, 0, 0, width, height, str(img.tobytes())) #print export to screen sys.stdout.write("%s" % cv.export_to_memory(exformat))