项目
在 GitHub 查看 



BEPb/image_to_ascii
关于
Everything is very simple: you either download a picture file or specify its link when running a python script, and output you get a text file, and you can immediately view on the command line how it will look the result of your conversion.
开发工具实测星标增长
- 24小时
- +1
- 7天
- +6
- 15天
- +11
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.chinese.md
原文
将图像转换为 .txt 文件
Read in other languages: English, हिन्दी, Português, Русский
怎么运行的?
一切都很简单:你要么下载一个图片文件,要么在运行 python 脚本时指定它的链接,然后 输出你得到一个文本文件,你可以立即在命令行上查看它的外观 你转换的结果。
准备和使用机器人的程序
克隆存储库或从 github 下载存档或在命令行上使用以下命令
$ cmd $ git clone https://github.com/BEPb/image_to_ascii $ cd image_to_ascii
应用存储库
- 从文件安装依赖项,为此,在命令行中输入以下代码:
$ pip3 install -r requirements.txt
- 程序启动的一般形式:
$ python3 img_to_txt_rus.py [file/url] [size]
*参数:
[file/url]:本地文件路径或在线图片URL。
[size]:输出txt图片的字符宽度——整数,size越大图片越清晰。
例子
$ python3 img_to_txt.py https://i.postimg.cc/t4Cmn7wC/py.png
通过执行此命令,您将在当前“文本”文件夹中获得一个名为“out.txt”的文件,您将在控制台中看到该行的输出:


视频到文本转换器
原理类似,只是生成的文本文件不存在。
cd C:\Users\root\PycharmProjects\image_to_ascii
python video_to_txt.py animations\filin.gif 150


License
探索相关项目
加载中…