Documentation
¶
Index ¶
- Constants
- Variables
- func CropCircle(img image.Image) image.Image
- func Decode(r io.Reader) (image.Image, error)
- func DecodeFile(path string) (image.Image, error)
- func DrawPureCircle(color color.RGBA, radius int) image.Image
- func DrawPureRect(w, h int, color color.RGBA) image.Image
- func DrawText(src image.Image, text string, color color.Color, face font.Face, x, y int) image.Image
- func FmtExt(path string) string
- func Montage(imgs []image.Image, opts ...MontageOption) image.Image
- func NewRGBA(r, g, b, a uint8) color.RGBA
- func Resize(width, height uint, img image.Image) image.Image
- func Save(img image.Image, path string, options ...Option) error
- func Thumbnail(maxWidth, maxHeight uint, img image.Image) image.Image
- type Direction
- type MontageOption
- type Option
Constants ¶
View Source
const ( JPG = "jpg" JPEG = "jpeg" PNG = "png" GIF = "gif" BMP = "bmp" WEBP = "webp" )
Variables ¶
View Source
var MontageOpts = montageOptions{}
View Source
var UnsupportExtError = fmt.Errorf("unsupported image extension")
Functions ¶
func DrawPureRect ¶ added in v1.0.0
DrawPureRect draw a pure color rectangle image using the given size and color.
Types ¶
type MontageOption ¶ added in v1.0.0
type MontageOption func(opts *montageOptions)
type Option ¶ added in v1.0.0
type Option interface{}
func DefaultQuality ¶ added in v1.0.0
func DefaultQuality() Option
func HighQulity ¶ added in v1.0.0
func HighQulity() Option
func NewGifOption ¶ added in v1.0.0
func NewJpgOption ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.