写了一个好玩的脚本,图片转为文本文件

2018 年 4 月 25 日
 hellolleh

Image transfer to txt

--

Usage

$ python3 img_to_txt.py [file/url] [size]

Example

$ python3 img_to_txt.py http://ocas9civ7.bkt.clouddn.com/jzm.jpg

This command executed, you will get a file in current folder named out.txt, and you will watch a string output in the console:

Github 地址

https://github.com/yaochao/img_to_txt

10258 次点击
所在节点    Python
55 条回复
lhx2008
2018 年 4 月 25 日
+1,可以搞个 web 版的
NicholasWangC
2018 年 4 月 25 日
好东西,我选 jp2a
silhouette
2018 年 4 月 25 日
+1s
frank611
2018 年 4 月 25 日
实现原理可以介绍下么?
duan602728596
2018 年 4 月 25 日
吼啊
wanderlustLee
2018 年 4 月 25 日
兄弟要被查水表了
ssshooter
2018 年 4 月 25 日
Patrick95
2018 年 4 月 25 日
图片转字符画的 Python 项目在 GitHub 上已经有好多好多啦。
pyufftj
2018 年 4 月 25 日
这个人缺一副眼镜
hellolleh
2018 年 4 月 25 日
@frank611 原理,很简单,通过图片的像素,转为响应的字符,颜色越深,字符越密集,所谓的密集就是 @#一类的字符,不密集就是.,;一类的字符。
Hopetree
2018 年 4 月 25 日
可以,下午茶有了,记得来取
shijingshijing
2018 年 4 月 25 日
月底了本来已经没名额了,楼主我还是想办法帮你弄了个名额,你在四月名单上了
lulinux
2018 年 4 月 25 日
莫不是内个膜法大师?
meik2333
2018 年 4 月 25 日
我之前也写了一个,把视频转换为字符画的:
https://github.com/MeiK-h/Video2Char
Tink
2018 年 4 月 25 日
ivencooli
2018 年 4 月 25 日
本来四月份的枪毙名单已经满了.我已经托关系把你放进去了
shijingshijing
2018 年 4 月 25 日
@Tink 这个厉害了
Tink
2018 年 4 月 25 日
@shijingshijing #17 233 试试

curl aoaoao.me:1926
moxiaonai
2018 年 4 月 25 日
ob
2018 年 4 月 25 日
还有动画版的

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/449707

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX