https://github.com/xyproto/carveimg
Two image viewing utilities for the terminal
https://github.com/xyproto/carveimg
ansi-art ascii-art ascii-art-generator cli content-aware-resize gif image-viewer jpeg png terminal terminal-graphics
Last synced: about 1 month ago
JSON representation
Two image viewing utilities for the terminal
- Host: GitHub
- URL: https://github.com/xyproto/carveimg
- Owner: xyproto
- License: bsd-3-clause
- Created: 2022-06-08T14:55:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-17T09:20:53.000Z (2 months ago)
- Last Synced: 2025-03-29T03:03:02.249Z (about 2 months ago)
- Topics: ansi-art, ascii-art, ascii-art-generator, cli, content-aware-resize, gif, image-viewer, jpeg, png, terminal, terminal-graphics
- Language: Go
- Homepage:
- Size: 49.9 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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 image resizing is done with [`github.com/esimov/caire`](https://github.com/esimov/caire).
* The palette reduction is done with [`github.com/xyproto/palgen`](https://github.com/xyproto/palgen).
* The image reszing may be very slow for larger images.## The `img` utilitiy
* The image resizing is done with [`golang.org/x/image/draw`](https://golang.org/x/image/draw) and the [`CatmullRom`](https://pkg.go.dev/golang.org/x/[email protected]/draw#pkg-variables) kernel.
* The palette reduction is done with [`github.com/xyproto/palgen`](https://github.com/xyproto/palgen).## General info
* Version: 1.4.7
* License: BSD-3
* Author: Alexander F. Rødseth <[email protected]>