Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScaleToWidth ¶ added in v1.2.4
ScaleToWidth decodes imgData and scales it to the terminal width (cols columns, or the whole terminal when cols <= 0) for webtoon reading. It never enlarges past the native width: a 900px strip stays 900px wide on a wide terminal instead of turning blurry and huge.
Types ¶
type RenderedImage ¶
type Renderer ¶
type Renderer interface {
RenderInBox(imgData []byte, cols, rows int) (RenderedImage, error)
RenderImage(img image.Image) (RenderedImage, error)
}
type TerminalSize ¶
func GetTerminalSize ¶
func GetTerminalSize() (TerminalSize, error)
Click to show internal directories.
Click to hide internal directories.