Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

建议使用 ASCII 方式显示二维码 #109

Open
ihipop opened this issue Feb 17, 2017 · 2 comments
Open

建议使用 ASCII 方式显示二维码 #109

ihipop opened this issue Feb 17, 2017 · 2 comments

Comments

@ihipop
Copy link

ihipop commented Feb 17, 2017

二维码结构简单,且就黑白2色 完全可以转换成纯ascii显示 终端可以直接扫描
建议1. img2txt.py
https://github.com/hit9/img2txt
此方式完全使用python的方式 是最方便的
img2txt.py --ansi xxxx.png
缺陷:代码实现尺寸限制的地方有bug,出来的二维码很大,但是质量很好
建议2. img2text 依赖caca-utils
https://linux.die.net/man/1/img2txt

image

@ihipop ihipop changed the title 建议使用 ANSCII 方式显示二维码 建议使用 ASCII 方式显示二维码 Feb 17, 2017
@winkidney
Copy link
Collaborator

winkidney commented Feb 17, 2017

不知道引入终端显示二维码是要解决一个什么问题呢?

我理解的话,

  1. 这个功能会引入PIL依赖或者一些图片库,也就是需要解析图片的像素,和使用PIL打开图片的方式似乎区别不大?
  2. 考虑不要引入PIL依赖的话,似乎使用Web的方式来查看和扫码似乎更好?

@ihipop
Copy link
Author

ihipop commented Feb 17, 2017

确实会引入一个PIL的依赖 https://github.com/hit9/img2txt
caca-utils没有PIL依赖 到时候也就是多一个外部调用 但是但是他生成的二维码有乱七八糟的字符 ,有时候扫描有些困难。没有img2txt.py干净

这个就是取舍问提我就是提个建议。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants