Versions in this module Expand all Collapse all v1 v1.1.3 Jun 16, 2022 Changes in this version + const TopLeft + var ErrFileNotSupport = errors.New("file not support") + var ErrSaveImageFormatNotSupport = errors.New("save image format not support") + var ErrSourceImageIsNil = errors.New("imgo load source image is nil") + var ErrSourceImageNotSupport = errors.New("imgo load source image not support") + var ErrSourceNotSupport = errors.New("imgo load source not support") + var ErrSourceStringIsEmpty = errors.New("imgo load source string is empty") + func Color2Hex(c color.Color) string + func GetImageType(bytes []byte) (ext string, mime string, decoder func(r io.Reader) (image.Image, error), ...) + func Image2RGBA(img image.Image) *image.RGBA + func NormalizeKernel(kernel [][]float64) + type FlipType int + const Horizontal + const Vertical + type Image struct + Error error + func Canvas(width, height int, fillColor ...color.Color) *Image + func Load(source any) *Image + func LoadFromBase64(base64Str string) (i *Image) + func LoadFromFile(file *os.File) (i *Image) + func LoadFromImage(img image.Image) (i *Image) + func LoadFromPath(path string) (i *Image) + func LoadFromUrl(url string) (i *Image) + func (i *Image) Blur(ksize int) *Image + func (i *Image) Circle(x, y, radius int, c color.Color) *Image + func (i *Image) Crop(x, y, width, height int) *Image + func (i *Image) Ellipse(x, y, width, height int, c color.Color) *Image + func (i *Image) Flip(flipType FlipType) *Image + func (i *Image) GaussianBlur(ksize int, sigma float64) *Image + func (i *Image) Grayscale() *Image + func (i *Image) ImageFilter(kernel [][]float64) *Image + func (i *Image) ImageFilterFast(kernel [][]float64) *Image + func (i *Image) Insert(source any, x, y int) *Image + func (i *Image) Line(x1, y1, x2, y2 int, c color.Color, width ...int) *Image + func (i *Image) MainColor() (res color.RGBA) + func (i *Image) Mosaic(size, x1, y1, x2, y2 int) *Image + func (i *Image) Pixel(x, y int, c color.Color) *Image + func (i *Image) Pixelate(size int) *Image + func (i *Image) RadiusBorder(radius float64) *Image + func (i *Image) Rectangle(x, y, width, height int, c color.Color) *Image + func (i *Image) Resize(width, height int) *Image + func (i *Image) Rotate(angle int) *Image + func (i *Image) Save(path string, quality ...int) *Image + func (i *Image) Text(label string, x, y int, fontPath string, fontColor color.Color, ...) *Image + func (i *Image) Thumbnail(width, height int) *Image + func (i Image) Bounds() image.Rectangle + func (i Image) Extension() string + func (i Image) Filesize() int64 + func (i Image) Height() int + func (i Image) HttpHandler(w http.ResponseWriter, r *http.Request) + func (i Image) Mime() string + func (i Image) PickColor(x, y int) (res color.RGBA) + func (i Image) String() string + func (i Image) ToBase64() string + func (i Image) ToImage() image.Image + func (i Image) Width() int + type ImageManager struct + type Radius struct + func (c *Radius) At(x, y int) color.Color + func (c *Radius) Bounds() image.Rectangle + func (c *Radius) ColorModel() color.Model