Browse Source

Merge branch 'main' of github.com:cacalabs/libcaca

tags/v0.99.beta20
Sam Hocevar 3 years ago
parent
commit
373c88b989
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      python/examples/img2txt.py

+ 2
- 2
python/examples/img2txt.py View File

@@ -35,7 +35,7 @@ DEPTH = 4
HELP_MSG = """\ HELP_MSG = """\
Usage: %s [OPTIONS]... <IMAGE> Usage: %s [OPTIONS]... <IMAGE>
Convert IMAGE to any text based available format. 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: Options:
-h, --help This help -h, --help This help
@@ -224,7 +224,7 @@ def main():
dit.set_charset(charset) dit.set_charset(charset)


#create dither #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 #print export to screen
sys.stdout.write("%s" % cv.export_to_memory(exformat)) sys.stdout.write("%s" % cv.export_to_memory(exformat))


Loading…
Cancel
Save