imgcat

package
v0.0.0-...-d15a9f0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package imgcat provides helpers for embedding images (gif, png, jpeg) in the terminal output as suppored by iTerm 2.9+ and documented at https://www.iterm2.com/images.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cat

func Cat(r io.Reader, w io.Writer) error

Cat embeds given io.Reader in the given io.Writer

func CatFile

func CatFile(fileName string, w io.Writer) error

CatFile embeds image file in the given io.Writer

func CatImage

func CatImage(i image.Image, w io.Writer) error

CatImage embeds given image.Image in the given io.Writer

func Clip

func Clip(origin image.Image, fm string, out io.Writer, x0, y0, x1, y1, quality int) error

* 图片裁剪 * 入参: * 规则:如果精度为0则精度保持不变 * * 返回:error

func Scale

func Scale(in io.Reader, out io.Writer, width, height, quality int) error

* 缩略图生成 * 入参: * 规则: 如果width 或 hight其中有一个为0,则大小不变 如果精度为0则精度保持不变 * 矩形坐标系起点是左上 * 返回:error

Types

This section is empty.

Jump to

Keyboard shortcuts

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