icat

package module
v0.0.0-...-aef531a Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2019 License: MIT Imports: 21 Imported by: 2

README

iCat

cat image

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "icat",
	Short: "image cat",
	Long:  ``,
	Run: func(cmd *cobra.Command, args []string) {
		size := len(args)
		if size > 0 {
			viper.Set("input", args[0])
			sp := strings.Split(args[0], ".")
			size := len(sp)
			if size <= 0 {
				return
			}
			viper.Set("ext", sp[size-1])
		} else {

		}
		if err := Excute(); err != nil {
			fmt.Println(err)
		}
	},
}
View Source
var (
	EOFB = []byte{174, 66, 96, 130}
)

Functions

func Cat

func Cat(img image.Image, wr io.Writer) error

func CatRect

func CatRect(img image.Image, height, width, top, left int, wr io.Writer) error

func CatRectangle

func CatRectangle(img image.Image, minX, minY, maxX, maxY int, wr io.Writer) error

func DecodeSVG

func DecodeSVG(r io.Reader) (image.Image, error)

func DisplaySVG

func DisplaySVG(bs []byte) error

func Excute

func Excute() error

func ICat

func ICat(img image.Image, wr io.Writer) error

func ICatBase64

func ICatBase64(imgBase64 string, wr io.Writer) error

func ICatHttp

func ICatHttp(uri string, w io.Writer) error

func ICatImage

func ICatImage(img image.Image) image.Image

func ICatRead

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

func ICatRect

func ICatRect(img image.Image, height, width int, wr io.Writer) error

func ReadDisplaySVG

func ReadDisplaySVG(r io.Reader) error

Types

type EncodeStdout

type EncodeStdout struct {
	// contains filtered or unexported fields
}

func NewEncodeStdout

func NewEncodeStdout() *EncodeStdout

func (*EncodeStdout) Write

func (p *EncodeStdout) Write(buf []byte) (n int, err error)

type EncodeWr

type EncodeWr struct {
	W io.Writer
	// contains filtered or unexported fields
}

func NewEncodeWr

func NewEncodeWr(w io.Writer, buff []byte) *EncodeWr

func (*EncodeWr) Flush

func (p *EncodeWr) Flush() error

func (*EncodeWr) FlushBase64Stdout

func (p *EncodeWr) FlushBase64Stdout(imgBase64 string) error

func (*EncodeWr) FlushStdout

func (p *EncodeWr) FlushStdout() error

func (*EncodeWr) Write

func (p *EncodeWr) Write(buf []byte) (n int, err error)

type MultiEncodeWr

type MultiEncodeWr struct {
	W []io.Writer
	// contains filtered or unexported fields
}

func NewMultiEncodeWr

func NewMultiEncodeWr(buff []byte, ws ...io.Writer) *MultiEncodeWr

func (*MultiEncodeWr) Close

func (p *MultiEncodeWr) Close()

func (*MultiEncodeWr) Flush

func (p *MultiEncodeWr) Flush(i int) error

func (*MultiEncodeWr) FlushBase64Stdout

func (p *MultiEncodeWr) FlushBase64Stdout(imgBase64 string) error

func (*MultiEncodeWr) FlushStdout

func (p *MultiEncodeWr) FlushStdout(i int) error

func (*MultiEncodeWr) Write

func (p *MultiEncodeWr) Write(buf []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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