Documentation
¶
Index ¶
- Constants
- func Clip(target image.Image, x0, y0, width, height int) image.Image
- func ClipImage(target image.Image, x0, y0, width, height int) image.Image
- func ClipPNG(target image.Image, x0, y0, width, height int) image.Image
- func MaskImage(src, mask image.Image, copyPoint image.Point) (draw.Image, error)
- func PieceImage(src, mask image.Image, copyPoint image.Point) (draw.Image, error)
- func Resize(target image.Image, width, height int) image.Image
- func SaveAsGIF(target image.Image, path string) error
- func SaveAsJPEG(target image.Image, path string) error
- func SaveAsPNG(target image.Image, path string) error
- func SaveBase64(source string, path string) (err error)
- func Thumbnail(target image.Image, maxWidth, maxHeight int) image.Image
- func ToBase64(target image.Image, imageType string) (data string, err error)
- func ToBytes(target image.Image, imageType string) (bs []byte, err error)
- func ToDataURI(target image.Image, imageType string) (data string, err error)
- type Img
- func (m *Img) Clip(x0, y0, width, height int) *Img
- func (m *Img) ClipPNG(x0, y0, width, height int) *Img
- func (p *Img) MustToBase64() (data string)
- func (p *Img) MustToDataURI() (data string)
- func (p *Img) Resize(width, height int) *Img
- func (p *Img) Save(path string) error
- func (p *Img) Thumbnail(width, height int) *Img
- func (p *Img) ToBase64() (data string, err error)
- func (p *Img) ToBytes() (bs []byte, err error)
- func (p *Img) ToDataURI() (data string, err error)
Constants ¶
View Source
const ( JPEG = "jpeg" PNG = "png" GIF = "gif" BMP = "bmp" TIF = "tif" WEBP = "webp" )
Variables ¶
This section is empty.
Functions ¶
func PieceImage ¶
PieceImage 获取蒙版遮罩镂空的区域
Types ¶
Click to show internal directories.
Click to hide internal directories.