代码拉取完成,页面将自动刷新
Converts an image to binary ANSI art like so:
Check out the examples folder for some image samples and their corresponding output. Ex.
cat examples/pikachu.ansi
I optimized for images with dark backgrounds and used 0's and 1's for the character set but it's pretty easy to customize the code to convert to your liking! The basic strategy of conversion is very simple:
go get github.com/jhchen/ansize
ansize <image> <output> [width]
On a Mac with Homebrew the commands are
brew install go
mkdir /usr/local/lib/go
export GOPATH=/usr/local/lib/go
go get github.com/nfnt/resize
git clone git@github.com:jhchen/ansize.git
go build ansize.go
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。