项目
在 GitHub 查看
jhchen/ansize
关于
Convert images to binary ANSI art
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Ansize
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:
- Shrink image to desired size
- For each pixel, find the corresponding color in ANSI's limited color palette
- Set the foreground to that color
- Print a random 0 or 1
Installation
go get github.com/jhchen/ansize
Usage
ansize <image> <output> [width]
Development
- Install go
- Set your $GOPATH
- Install github.com/nfnt/resize
- Clone ansize
- Build ansize
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 [email protected]:jhchen/ansize.git
go build ansize.go
探索相关项目
加载中…
