Documentation
¶
Overview ¶
Package mosaic provides a unicode image renderer.
Index ¶
- func Render(img image.Image, width int, height int) string
- type Mosaic
- func (m Mosaic) Dither(dither bool) Mosaic
- func (m Mosaic) Height(height int) Mosaic
- func (m Mosaic) IgnoreBlockSymbols(fgOnly bool) Mosaic
- func (m Mosaic) InvertColors(invertColors bool) Mosaic
- func (m *Mosaic) Render(img image.Image) string
- func (m Mosaic) Scale(scale int) Mosaic
- func (m Mosaic) Symbol(symbol Symbol) Mosaic
- func (m Mosaic) Threshold(threshold int) Mosaic
- func (m Mosaic) Width(width int) Mosaic
- type Symbol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mosaic ¶
type Mosaic struct {
// contains filtered or unexported fields
}
Mosaic represents a Unicode image renderer.
Example:
```go
art := mosaic.New().Width(100). // Limit to 100 cells
Scale(mosaic.Fit). // Fit to width
Render()
```
func (Mosaic) Height ¶
Height sets the maximum height the image can have. Defaults to the image height.
func (Mosaic) InvertColors ¶
InvertColors whether to invert the colors of the mosaic image.
func (*Mosaic) Render ¶
Render renders the image to a string.
func (Mosaic) Symbol ¶
Symbol sets the mosaic symbol type.
Source Files
¶
- mosaic.go
Click to show internal directories.
Click to hide internal directories.
