img

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64ToBytes

func Base64ToBytes(data string) ([]byte, error)

Base64ToBytes 将base64转成bytes

func Clip

func Clip(target image.Image, x0, y0, width, height int) image.Image

Clip 剪切image

func FromFile

func FromFile(path string) (image.Image, error)

FromFile

func SaveAsJPEG

func SaveAsJPEG(target image.Image, path string) error

SaveAsJPEG

func SaveAsPNG

func SaveAsPNG(target image.Image, path string) error

SaveAsPNG

func SaveBase64

func SaveBase64(source string, filePath string) (err error)

SaveBase64 将base64字串保存为图片

func ToBase64

func ToBase64(target image.Image, imageType string) (data string, err error)

ToJPEGBase64 将image转成各种图片编码的base64字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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