carveimg

package module
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: BSD-3-Clause Imports: 15 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
carve command
img command

Jump to

Keyboard shortcuts

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