Documentation ¶
Index ¶
- func ResizeByWidth(srcFile string, dstFile string, width int, autoRotate bool, opt *ImageOption) (string, error)
- func RgbaToNRGBA(rgba image.Image) *image.NRGBA
- func Rotate180(img image.Image) *image.NRGBA
- func Rotate270(img image.Image) *image.NRGBA
- func Rotate90(img image.Image) *image.NRGBA
- func SaveToBuffer(imgType string, img image.Image) ([]byte, error)
- func SaveToFile(filename string, imgType string, img image.Image) error
- type Circle
- type DrawImageOption
- type DrawTextOption
- type ImageEx
- func (me *ImageEx) DrawBackground(r, g, b int)
- func (me *ImageEx) DrawCircle(src image.Image, srcX, srcY, r int, dstX, dstY int)
- func (me *ImageEx) DrawHLine(color color.Color, x, fromY, toY int)
- func (me *ImageEx) DrawImage(x, y int, img image.Image, option *DrawImageOption) *image.NRGBA
- func (me *ImageEx) DrawImageByFile(x, y int, imageFile string, option *DrawImageOption) error
- func (me *ImageEx) DrawLine(x0, y0, x1, y1 int, brush PutPixel)
- func (me *ImageEx) DrawText(x int, y int, text string, fontColor color.Color, option *DrawTextOption) error
- func (me *ImageEx) DrawVLine(color color.Color, fromX, toX, y int)
- func (me *ImageEx) GetImage() image.Image
- func (me *ImageEx) GetImageRGB() *image.NRGBA
- func (me *ImageEx) LoadFromBuffer(buf []byte) (image.Image, error)
- func (me *ImageEx) LoadFromFile(filename string) (image.Image, error)
- func (me *ImageEx) Resize(width, height int)
- func (me *ImageEx) ResizePercent(per int)
- func (me *ImageEx) SaveToBuffer(w io.Writer, imgType string) error
- func (me *ImageEx) SaveToFile(filename string, imgType string) error
- func (me *ImageEx) SaveToFileJPG(filename string, quality int) error
- func (me *ImageEx) SetFont(font *truetype.Font)
- func (me *ImageEx) SetFontFile(filename string) error
- func (me *ImageEx) SubImage(x, y, w, h int) image.Image
- func (me *ImageEx) SubImageByPos(x0, y0, x1, y1 int) image.Image
- type ImageOption
- type PutPixel
- type RotateType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResizeByWidth ¶
Types ¶
type Circle ¶
type Circle struct {
// contains filtered or unexported fields
}
func (*Circle) ColorModel ¶
type DrawImageOption ¶
type DrawTextOption ¶
type ImageEx ¶
type ImageEx struct {
// contains filtered or unexported fields
}
func NewImageFromImage ¶
func (*ImageEx) DrawBackground ¶
func (*ImageEx) DrawCircle ¶
func (*ImageEx) DrawImageByFile ¶
func (me *ImageEx) DrawImageByFile(x, y int, imageFile string, option *DrawImageOption) error
func (*ImageEx) GetImageRGB ¶
func (*ImageEx) LoadFromFile ¶
func (*ImageEx) ResizePercent ¶
func (*ImageEx) SaveToFileJPG ¶
func (*ImageEx) SetFontFile ¶
type ImageOption ¶
type RotateType ¶
type RotateType int
func ReadOrientation ¶
func ReadOrientation(filename string) RotateType
Click to show internal directories.
Click to hide internal directories.