Discover Packages
github.com/hawklithm/imgcat
lib
package
Version:
v0.0.0-...-d15a9f0
Opens a new window with list of versions in this module.
Published: Jun 28, 2019
License: GPL-3.0
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Overview
Index
Constants
Variables
Functions
Cat(r, w)
CatFile(fileName, w)
CatImage(i, w)
Clip(origin, fm, out, x0, y0, x1, y1, quality)
Scale(in, out, width, height, quality)
Types
Source Files
Documentation
Documentation
¶
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
func Cat(r io.Reader, w io.Writer) error
func CatFile(fileName string, w io.Writer) error
func CatImage(i image.Image, w io.Writer) error
func Clip(origin image.Image, fm string, out io.Writer, x0, y0, x1, y1, quality int) error
func Scale(in io.Reader, out io.Writer, width, height, quality int) error
Cat embeds given io.Reader in the given io.Writer
CatFile embeds image file in the given io.Writer
CatImage embeds given image.Image in the given io.Writer
* 图片裁剪
* 入参:
* 规则:如果精度为0则精度保持不变
*
* 返回:error
* 缩略图生成
* 入参:
* 规则: 如果width 或 hight其中有一个为0,则大小不变 如果精度为0则精度保持不变
* 矩形坐标系起点是左上
* 返回:error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.