1
0
Fork 0
mirror of https://github.com/imjasonh/dots synced 2026-07-07 00:22:55 +00:00
No description
Find a file
Jason Hall e163bc9ea3 update readme
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-11-14 10:47:03 -05:00
cmd/dots simplify 2025-11-14 10:40:40 -05:00
testdata simplify 2025-11-14 10:40:40 -05:00
ansi_test.go simplify 2025-11-14 10:40:40 -05:00
braille.go simplify 2025-11-14 10:40:40 -05:00
braille_test.go simplify 2025-11-14 10:40:40 -05:00
color.go simplify 2025-11-14 10:40:40 -05:00
color_test.go simplify 2025-11-14 10:40:40 -05:00
dimensions_test.go simplify 2025-11-14 10:40:40 -05:00
dots.png update readme 2025-11-14 10:47:03 -05:00
go.mod simplify 2025-11-14 10:40:40 -05:00
go.sum initial commit 2025-11-14 10:02:12 -05:00
LICENSE simplify 2025-11-14 10:40:40 -05:00
quantize.go simplify 2025-11-14 10:40:40 -05:00
README.md update readme 2025-11-14 10:47:03 -05:00

dots

Go Reference

Convert images to braille art in the terminal with ANSI colors.

$ dots -w 40 testdata/rainbow_gradient.png

dots

Install

go install github.com/imjasonh/dots/cmd/dots@latest

CLI Usage

# Auto-fit to terminal, maintain aspect ratio
dots image.png

# Specify width (height calculated from aspect ratio)
dots -w 80 image.png

# Specify both dimensions
dots -w 80 -h 40 image.png

# Add background color
dots -background ff0000 image.png

Library Usage

import "github.com/imjasonh/dots"

img, _ := loadImage("photo.png")
lines := dots.Convert(img, dots.Options{
    Width:  80,
    Height: 40,
})
for _, line := range lines {
    fmt.Println(line)
}