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 imageimg
- uses regular image resizing before displaying the image
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 |
---|---|---|
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 image resizing is done with
github.com/esimov/caire
. - The palette reduction is done with
github.com/xyproto/palgen
. - The image reszing may be very slow for larger images.
- The image resizing is done with
golang.org/x/image/draw
and theCatmullRom
kernel. - The palette reduction is done with
github.com/xyproto/palgen
.
- Version: 1.4.6
- License: BSD-3
- Author: Alexander F. Rødseth <xyproto@archlinux.org>