img

command module
v0.0.0-...-509ffec Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2019 License: MIT Imports: 6 Imported by: 0

README

img - Command-line image viewer

A command line tool to view images (PNG, JPEG, GIF) right on the terminal. img comes in handy in the following scenarios:

  • to view images over SSH and VPN connections (where it's cumbersome to grab images and view them on the host machine)
  • can be used to generate splash screens for Linux logins (e.g. motd)
  • you never have to leave the terminal if you are working with image generation code
  • just for fun!
GIF
GIF demo
JPEG/PNG
Static image demo

Installation

macOS
brew tap codeliveroil/apps
brew install img
Other

Download the latest release for your operating system and machine architecture. If one is not available, you can very easily compile from source.

Usage

img -help
Examples
img car.png
img -w logo.sh logo.gif
img -l 2 wheel.gif

Library API for Go

img := viz.Image{
	Filename:  "input.gif",
	LoopCount: 2,
}

// Read the image
if err := img.Init(); err != nil {
	//handle error
}

// Render the image
if err := img.Draw(&viz.StdoutCanvas{}); err != nil {
	//handle error
}

Compile from source

Setup
  1. Install Go
  2. Clone this repository
Build for your current platform
make
make install
Cross compile for a different platform
  1. Build
    make platform
    
  2. Follow the prompts and select a platform
  3. The binary will be available in the build folder

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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