showyourself

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

README

Artsy 🖼

16 color image viewer for the terminal that uses content aware image resizing.

Why

I wanted to develop an image viewer that could be usable from within o, a small editor/IDE I wrote that targets VT100 compatible terminal emulators.

Features and limitations

  • The content-aware image resizing changes the image, but keeps the most interesting content.
  • The palette reduction is done by palgen.

Comparison

Original PNG image In a VT100 compatible terminal emulator, using 16 colors

The images are changed, but the essence is kept.

Installation

The artsy utility can be installed with Go 1.17 or later:

go install github.com/xyproto/artsy/cmd/artsy@latest

General info

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DrawRune = '▒'

Functions

func ConvertToNRGBA

func ConvertToNRGBA(img image.Image) (*image.NRGBA, error)

func Draw

func Draw(canvas *vt100.Canvas, m image.Image) error

Draw attempts to draw the given image.Image onto a VT100 Canvas

func LoadImage

func LoadImage(filename string) (*image.NRGBA, error)

LoadImage loads a PNG image and converts it to *image.NRGBA

Types

This section is empty.

Directories

Path Synopsis
cmd
artsy command

Jump to

Keyboard shortcuts

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