a tool to output images as RGB ANSI graphics on the terminal

imgcat

Tool to output images in the terminal. Built with bubbletea

install

homebrew

brew install trashhalo/homebrew-brews/imgcat

prebuilt packages

Prebuilt packages can be found at the releases page

aur

yay -S imgcat

sample output

imgcat https://i.redd.it/65fmdbh1ja951.jpg

sample

files on disk

imgcat *.jpg
  • j, down: next image
  • k, up: previous image

gifs

imgcat supports gifs and yes they will animate on your terminal. The quality of that animation seems largely dependant on your terminal. Kitty runs them best.

svgs

imgcat has experimental svg support.

Owner
Stephen Solka
404 bio not found
Stephen Solka
Comments
  • Restructured the project so it can be used as a library in other progams as well

    Restructured the project so it can be used as a library in other progams as well

    When I initially ran in this program I quickly got excited about what I could do with it inside some of my own internal tools. Only to realize everything was just in a single main.go file. So I figured I would split all of the logic into a separate file/library so it can easily be reused in other programs. The main binary as you're used to it is now in ./cmd/imgcat instead, this may require some adjusting to goreleaser.

  • Higher resolution by mixing fore- & background colors

    Higher resolution by mixing fore- & background colors

    It would be interesting to achieve a higher display resolution by combining fore- & background colors on half-height blocks and graphic characters like:

    ▄▀
    

    and

    ░▒▓
    
  • Brew warning Warning: Calling bottle :unneeded is deprecated! There is no replacement.

    Brew warning Warning: Calling bottle :unneeded is deprecated! There is no replacement.

    Warning: Calling bottle :unneeded is deprecated! There is no replacement. Please report this issue to the trashhalo/brews tap (not Homebrew/brew or Homebrew/core): /opt/homebrew/Library/Taps/trashhalo/homebrew-brews/Formula/imgcat.rb:6

  • Support EXIF Orientation

    Support EXIF Orientation

    I just ran imgcat on one of my photos and it appeared rotated 90 degrees. This rotation information is stored in EXIF metadata and could be counter-rotated before display.

    With vexif/main.go:

    $ vexif mypic.JPG | grep Orientation
      Orientation = 6
    

    https://jdhao.github.io/2019/07/31/image_rotation_exif_info/

  • Add SVG support

    Add SVG support

    Seems to work mostly, but there are still some bugs:

    imgcat.exe https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/tiger.svg
    couldn't load image(s): png: invalid format: invalid image size: 0x800
    
  • Horizontally fit or center images

    Horizontally fit or center images

    The original code only checks that the image fits the screen vertically. If the image aspect ratio is wider than of the terminal window; then line wrapping will occur and the image will be distorted.

    This patch also keeps track of terminal width; and attempts to fit the image in both directions using the resize.Thumbnail function instead of resize.Resize.

    chg0 Left: Original, Right: Fitted

    I also horizontally center the image if the width is wider: chg1

  • code clean up and attempt to render animation

    code clean up and attempt to render animation

    giphy

    @muesli I made an attempt to do gif support. This branch represents that effort. The code "works" in the sense of if you hand it a gif it will animate it correctly. The problem I am hitting is either my terminal[1] or bubbletea doesn't seem fast enough to render the animation without lots of flashing/tearing.

    Test gif I have been using attached to PR. Not sure if you have any clever ideas.

    1. I use the terminal that comes with elementary os. I tried Hyper.sh too. It seems to perform a little better but I couldnt get trucolor's to kick in so it was mostly black an white.
  • add aur instructions

    add aur instructions

    Hi, I'm an Arch Linux package maintainer. I'm submitting this PR to let you know that I created the following package for the installation of imgcat on Arch Linux and other distributions that support installing packages from AUR:

    I also updated README.md about installation from AUR. (933616c)

    BR, orhun.

  • Make the library imgcat useful for people who want to embed images

    Make the library imgcat useful for people who want to embed images

    I think we should split this project up into a library (root folder of the repo) and the imgcat command itself (probably in /cmd/imgcat).

    I'd love to use this in glow / glamour to optionally display images :heart:

Simple tool for changing graphics in dbd

Config changer for Dead By Deaylight For now only for epic store version And if only installed under C:\ further updates will include support for vers

May 3, 2022
Go binding for the cairo graphics library

go-cairo Go binding for the cairo graphics library Based on Dethe Elza's version https://bitbucket.org/dethe/gocairo but significantly extended and up

Dec 19, 2022
This is old and unmaintained code, ignore it. starfish is a simple, SDL based, 2D graphics and user input library for Go. If you intend to work on it, please fork from the 'devel' branch, not 'master'. Current release: 0.12.0

What is starfish? What starfish is: starfish is a simple 2D graphics and user input library for Go built on SDL. What starfish is not: While it is bui

Jun 4, 2019
A Grid based 2D Graphics library
A Grid based 2D Graphics library

gridder Built on top of Go Graphics github.com/fogleman/gg with the idea to simplify visualizing Grids using 2D Graphics. Dependencies gg github.com/f

Dec 1, 2022
Go Graphics - 2D rendering in Go with a simple API.
Go Graphics - 2D rendering in Go with a simple API.

Go Graphics gg is a library for rendering 2D graphics in pure Go. Installation go get -u github.com/fogleman/gg Alternatively, you may use gopkg.in t

Dec 29, 2022
Resize upladed images to s3 bucket with given sizes, and uploades new images back to bucket

Features Resize upladed images to s3 bucket with given sizes, and uploades new images back to bucket Environment Variables IMAGE_SIZES - formax 200x20

Feb 2, 2022
Simple ANSi to PNG converter written in pure Go

AnsiGo Description AnsiGo is a simple ANSi to PNG converter written in pure Go. It converts files containing ANSi sequences (.ANS) into PNG images. Fo

May 17, 2022
A collection of (ANSI-sequence aware) text reflow operations & algorithms
A collection of (ANSI-sequence aware) text reflow operations & algorithms

reflow A collection of ANSI-aware methods and io.Writers helping you to transform blocks of text. This means you can still style your terminal output

Dec 29, 2022
A cross-platform tool to convert images into ascii art and print them on the console
A cross-platform tool to convert images into ascii art and print them on the console

A cross-platform tool to convert images into ascii art and print them on the console

Dec 30, 2022
2D rendering for different output (raster, pdf, svg)
2D rendering for different output (raster, pdf, svg)

draw2d Package draw2d is a go 2D vector graphics library with support for multiple outputs such as images (draw2d), pdf documents (draw2dpdf), opengl

Dec 25, 2022
Draw graphs through GO MOD GRAPH output
Draw graphs through GO MOD GRAPH output

go-mod-graph-chart build chart by go mod graph output Install $ go get -u github.com/PaulXu-cn/go-mod-graph-chart/gmchart Usage

Dec 14, 2022
A command to output longified ascii art.

longify A command to output longified ascii art. Inspired by Tweet from @sheepla: https://twitter.com/Sheeeeepla/status/1522199846870196225 Installati

Sep 12, 2022
Read and write Netpbm images from Go programs

netpbm Introduction netpbm is a package for the Go programming language that implements image decoders and encoders for the Netpbm image formats. The

Dec 29, 2022
Pure Golang Library that allows simple LSB steganography on images
Pure Golang Library that allows simple LSB steganography on images

Steganography Lib Steganography is a library written in Pure go to allow simple LSB steganography on images. It is capable of both encoding and decodi

Dec 22, 2022
Resize images and animated GIFs in Go

Lilliput relies on mature, high-performance C libraries to do most of the work of decompressing, resizing and compressing images. It aims to do as little memory allocation as possible and especially not to create garbage in Go. As a result, it is suitable for very high throughput image resizing services.

Jan 3, 2023
Reproducing images with geometric primitives.
Reproducing images with geometric primitives.

Primitive Pictures Reproducing images with geometric primitives. How it Works A target image is provided as input. The algorithm tries to find the sin

Dec 31, 2022
Fast and secure standalone server for resizing and converting remote images

imgproxy imgproxy is a fast and secure standalone server for resizing and converting remote images. The main principles of imgproxy are simplicity, sp

Jan 1, 2023
An iterative algorithm to generate high quality triangulated images.
An iterative algorithm to generate high quality triangulated images.

Triangula uses a modified genetic algorithm to triangulate images. It works best with images smaller than 3000px and with fewer than 3000 points, typically producing an optimal result within a couple of minutes.

Jan 8, 2023
A go library for reading and creating ISO9660 images

iso9660 A package for reading and creating ISO9660, forked from https://github.com/kdomanski/iso9660. Requires Go 1.13 or newer. Joliet and Rock Ridge

Mar 4, 2021