image

package
v0.0.0-...-532f4bb Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMergeImagePx = 360
)

Variables

This section is empty.

Functions

func GetImageInfo

func GetImageInfo(filename string) (width int, height int, length int64, isGif bool, err error)

GetImageInfo 获取图片信息

func GetThumbData

func GetThumbData(filename string, width, height int) ([]byte, error)

GetThumbData 获取缩略图

func ImageShrink

func ImageShrink(img image.Image, width, height int) image.Image

ImageShrink 图片压缩

func LoadLocalImage

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

LoadLocalImage 本地获取图片

func LoadUrlImage

func LoadUrlImage(url string) (image.Image, error)

LoadUrlImage 丛网页获取图片

func MergeImageByUrl

func MergeImageByUrl(urls []string, maxPx, spacePx int) (*image.RGBA, error)

MergeImageByUrl 拼接图片

func RandomImageName

func RandomImageName() string

RandomImageName 生成图片名称

func SaveImage

func SaveImage(targetPath string, img image.Image) error

SaveImage 保存图片

Types

This section is empty.

Jump to

Keyboard shortcuts

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