Documentation
¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_IMAGE_HEIGHT = 24 DEFAULT_IMAGE_WIDTH = 80 )
View Source
const ANSI_BG_RGB_COLOR = "\x1b[48;2;%d;%d;%dm"
View Source
const ANSI_BG_TRANSPARENT_COLOR = "\x1b[0;39;49m"
View Source
const ANSI_FG_RGB_COLOR = "\x1b[38;2;%d;%d;%dm▄"
View Source
const ANSI_FG_TRANSPARENT_COLOR = "\x1b[0m "
View Source
const ANSI_RESET = "\x1b[0m"
Variables ¶
View Source
var InterpolationType = imaging.Lanczos
Functions ¶
This section is empty.
Types ¶
type ImageViewModel ¶
type ImageViewModel struct {
// contains filtered or unexported fields
}
A model which handles the displaying/resizing of an image in ASCII characters
func NewImageViewModelFromBytes ¶
func NewImageViewModelFromBytes(imageBytes []byte) (output ImageViewModel)
Returns a new ImageViewModel with the given image bytes
func (ImageViewModel) Init ¶
func (m ImageViewModel) Init() tea.Cmd
func (*ImageViewModel) RerenderImage ¶
func (m *ImageViewModel) RerenderImage(newDimensions tea.WindowSizeMsg) *ImageViewModel
Rerenders the image's bytes in ASCII characters according to the given dimensions and sets the ImageViewModel's stringifiedImage to the result
func (ImageViewModel) View ¶
func (m ImageViewModel) View() string
Click to show internal directories.
Click to hide internal directories.