carveimg

package module
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: BSD-3-Clause Imports: 15 Imported by: 1

README

Carve & Img

Two image viewing utilities for the terminal. Both of them can display images in only 16 colors.

  • carve - uses content-aware image resizing before displaying the image
  • img - uses regular image resizing before displaying the image

Screenshots

Original PNG image In a VT100 compatible terminal emulator, using seam carving for content-aware image resizing
Original PNG image In carve (wonky, but higher information density) In img (may look better, but retains less information

Installation

With Go 1.17 or later:

go install github.com/xyproto/carveimg/cmd/img@latest
go install github.com/xyproto/carveimg/cmd/carve@latest

The carve utility

The img utilitiy

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 an image and converts it to *image.NRGBA. Currently, PNG, GIF and JPEG images are supported.

Types

This section is empty.

Directories

Path Synopsis
cmd
img

Jump to

Keyboard shortcuts

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