Skip to content

Commit bd9412d

Browse files
committed
Added "ascii_magic__examples/*"
1 parent 5a8a183 commit bd9412d

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

ascii_magic__examples/input.png

20.7 KB
Loading
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
4+
__author__ = "ipetrash"
5+
6+
7+
# SOURCE: https://github.com/LeandroBarone/python-ascii_magic
8+
9+
10+
# pip install ascii-magic
11+
from ascii_magic import AsciiArt
12+
13+
14+
file_name = "input.png"
15+
my_art = AsciiArt.from_image(file_name)
16+
print(my_art.to_ascii(columns=40, monochrome=True))
17+
"""
18+
19+
ii
20+
.]EE].
21+
;JXEEXJ;
22+
iqX4444Xqi
23+
`tXg444444gXt`
24+
+CFLdg4444gdLFC+
25+
xuv. >6gEEg6> .vnx
26+
`au` :2442: `ua`
27+
^wXc+////[!^^![////+cXw^
28+
%SX4d44444GLiiLG44444d4XS%
29+
`tEg44EEEEEXn^::^nXEEEEE44gEt`
30+
=fPEEEEEEEEd* *dEEEEEEEEPf=
31+
i6dhhhhhhhhh6a*%ii%*a6hhhhhhhhhd6i
32+
^=^^^^^^^^^^=////////=^^^^^^^^^^=^
33+
"""

0 commit comments

Comments
 (0)