simple

command
v2.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

examples/picture/simple/main.go

The minimal picture demo: a single embedded image rendered with picture.Model, sized to fill the terminal. Press 'q' or ctrl+c to quit.

The core picture package renders an image.Image and registers no decoders, so the program decodes its own source. This file imports just image/png for the embedded PNG below (the minimal "bring your own decoder" path). For all common formats in one line instead, blank-import the helper:

import _ "github.com/NimbleMarkets/ntcharts/v2/picture/decoders"

which registers PNG, JPEG, GIF, WebP, BMP, and TIFF. examples/picture/main.go uses that helper.

For the fuller demo (HTTP fetching, fit cycling, Glyph/Kitty toggle, and a Kitty-capability badge) see examples/picture/main.go.

Jump to

Keyboard shortcuts

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