util

package
v0.0.0-...-a2a3c6d Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: GPL-3.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

View Source
const (
	IT_png = iota
	IT_jpeg
	IT_gif
	IT_webp
	IT_tiff
	IT_icns
	IT_ico
	IT_bmp
)

Variables

This section is empty.

Functions

func Crush

func Crush(filePath string) error

func CutEdge

func CutEdge(uri string, position string, step uint) (image.Image, error)

func DoCrush

func DoCrush(do bool, filePath string) error

func ImageDecode

func ImageDecode(r io.Reader) (image.Image, string, error)

func Info

func Info(uri string) (map[color.Color]int, error)

func Invert

func Invert(uri string) (image.Image, error)

func IsDir

func IsDir(path string) (bool, error)

func OpenURI

func OpenURI(uri string) (rc io.ReadCloser, err error)

func Resize

func Resize(uri string, w, h uint) (image.Image, error)

func SaveImage

func SaveImage(img image.Image, savePath string, imageType int) (err error)

func Transparent

func Transparent(uri string, red, green, blue uint32, transparentWhiteDirect bool) (image.Image, error)

Types

type Circle

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

func (*Circle) At

func (c *Circle) At(x, y int) color.Color

func (*Circle) Bounds

func (c *Circle) Bounds() image.Rectangle

func (*Circle) ColorModel

func (c *Circle) ColorModel() color.Model

Jump to

Keyboard shortcuts

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