ascii

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ascii converts raw video frames into truecolor terminal art.

Each character cell renders two vertical pixels using the upper-half block (▀): foreground colors the top pixel, background the bottom — the same technique doom-ascii uses. A WxH terminal therefore displays a Wx(2H) pixel image.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FitEven

func FitEven(cols, rows int) (pw, ph int)

FitEven clamps a terminal geometry to an even pixel height for the half-block renderer and returns pixel dimensions (pw, ph) for the decoder.

func FrameRGB

func FrameRGB(buf []byte, w, h int) string

FrameRGB renders a packed RGB24 frame (w*h*3 bytes, as ffmpeg's rawvideo rgb24 emits) sized exactly for the target cell grid: w columns, h*2 rows of pixels. Rows are joined with \r\n so the output is PTY-safe.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL