1package markdown
2
3import "github.com/eliukblau/pixterm/ansimage"
4
5type Options func(r *renderer)
6
7// DitheringMode type is used for image scale dithering mode constants.
8type DitheringMode uint8
9
10const (
11 NoDithering = DitheringMode(iota)
12 DitheringWithBlocks
13 DitheringWithChars
14)
15
16// Dithering mode for ansimage
17// Default is fine directly through a terminal
18// DitheringWithBlocks is recommended if a terminal UI library is used
19func WithImageDithering(mode DitheringMode) Options {
20 return func(r *renderer) {
21 r.imageDithering = ansimage.DitheringMode(mode)
22 }
23}