Documentation ¶
Index ¶
- func GetImageInfo(inputFilePath string) (int, int, error)
- func LoadImage(inputImagePath string) (img image.Image, err error)
- func ProcessImage(inputImagePath, outputImagePath string, processConfig ImageProcessor) error
- func ResizeImage(inputImagePath, outputImagePath string, width, height uint) error
- func SaveImage(outputImagePath string, img image.Image) (err error)
- func ThumbImage(inputImagePath, outputImagePath string, maxWidth, maxHeight uint) error
- type ImageProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetImageInfo ¶
GetImageInfo 获取图片的宽高信息
func ProcessImage ¶
func ProcessImage(inputImagePath, outputImagePath string, processConfig ImageProcessor) error
ProcessImage 图片裁剪
func ResizeImage ¶
ResizeImage 图片缩放
func ThumbImage ¶
ThumbImage 生成缩略图,根据传入的最大宽高生成缩略图,不会改变图片的比例
Types ¶
Click to show internal directories.
Click to hide internal directories.