Documentation
¶
Index ¶
- Variables
- func GetPaletted(im image.Image) *image.Paletted
- func Load(path string) image.Image
- func LoadAllFrames(path string, w, h int) []*image.NRGBA
- func MergeGif(delay int, im []*image.NRGBA) *gif.GIF
- func SaveGif(g *gif.GIF, path string) error
- func SavePng(im image.Image, path string) error
- type ImgFactory
- func LoadFirstFrame(path string, w, h int) *ImgFactory
- func MergeH(im []*image.NRGBA) *ImgFactory
- func MergeW(im []*image.NRGBA) *ImgFactory
- func NewFactory(w, h int, fillColor color.Color) *ImgFactory
- func Rotate(img image.Image, angle float64, w, h int) *ImgFactory
- func Size(im image.Image, w, h int) *ImgFactory
- func Text(font string, size float64, col []int, col1 []int, txt string) *ImgFactory
- func (dst *ImgFactory) AdjustBrightness(s float64) *ImgFactory
- func (dst *ImgFactory) AdjustContrast(a float64) *ImgFactory
- func (dst *ImgFactory) AdjustSaturation(a float64) *ImgFactory
- func (dst *ImgFactory) Blur(a float64) *ImgFactory
- func (dst *ImgFactory) Circle(r int) *ImgFactory
- func (dst *ImgFactory) Clip(w, h, x, y int) *ImgFactory
- func (dst *ImgFactory) ClipCircle(x, y, r int) *ImgFactory
- func (dst *ImgFactory) ClipCircleFix(x, y, r int) *ImgFactory
- func (dst *ImgFactory) Clone() *ImgFactory
- func (dst *ImgFactory) Convolve3x3() *ImgFactory
- func (dst *ImgFactory) FlipH() *ImgFactory
- func (dst *ImgFactory) FlipV() *ImgFactory
- func (dst *ImgFactory) Grayscale() *ImgFactory
- func (dst *ImgFactory) InsertBottom(im image.Image, w, h, x, y int) *ImgFactory
- func (dst *ImgFactory) InsertBottomC(im image.Image, w, h, x, y int) *ImgFactory
- func (dst *ImgFactory) InsertText(font string, size float64, col []int, x, y float64, txt string) *ImgFactory
- func (dst *ImgFactory) InsertUp(im image.Image, w, h, x, y int) *ImgFactory
- func (dst *ImgFactory) InsertUpC(im image.Image, w, h, x, y int) *ImgFactory
- func (dst *ImgFactory) InsertUpG(im []*image.NRGBA, w, h, x, y int) []*image.NRGBA
- func (dst *ImgFactory) Invert() *ImgFactory
- func (dst *ImgFactory) Reshape(w, h int) *ImgFactory
- func (dst *ImgFactory) Sharpen(a float64) *ImgFactory
Constants ¶
This section is empty.
Variables ¶
View Source
var ( White = []int{255, 255, 255, 255} Black = []int{0, 0, 0, 255} Red = []int{255, 0, 0, 255} Green = []int{0, 255, 0, 255} Blue = []int{0, 0, 255, 255} Yellow = []int{255, 255, 0, 255} Cyan = []int{0, 255, 255, 255} Magenta = []int{255, 0, 255, 255} Grey = []int{190, 190, 190, 255} Pink = []int{255, 181, 197, 255} Orange = []int{255, 165, 0, 255} TouM = []int{0, 0, 0, 0} )
颜色
Functions ¶
func GetPaletted ¶
GetPaletted 将image.Image转换为 *Paletted。最多256色
Types ¶
type ImgFactory ¶
处理中图像
func (*ImgFactory) AdjustBrightness ¶
func (dst *ImgFactory) AdjustBrightness(s float64) *ImgFactory
AdjustBrightness 亮度(-100, 100)
func (*ImgFactory) AdjustContrast ¶
func (dst *ImgFactory) AdjustContrast(a float64) *ImgFactory
AdjustContrast 对比度(-100, 100)
func (*ImgFactory) AdjustSaturation ¶
func (dst *ImgFactory) AdjustSaturation(a float64) *ImgFactory
AdjustSaturation 饱和度(-100, 100)
func (*ImgFactory) ClipCircle ¶
func (dst *ImgFactory) ClipCircle(x, y, r int) *ImgFactory
ClipCircle 扣取圆
func (*ImgFactory) ClipCircleFix ¶
func (dst *ImgFactory) ClipCircleFix(x, y, r int) *ImgFactory
ClipCircleFix 裁取圆图
func (*ImgFactory) InsertBottom ¶
func (dst *ImgFactory) InsertBottom(im image.Image, w, h, x, y int) *ImgFactory
InsertBottom 底部插入图片
func (*ImgFactory) InsertBottomC ¶
func (dst *ImgFactory) InsertBottomC(im image.Image, w, h, x, y int) *ImgFactory
InsertBottomC 底部插入图片 x,y是中心点
func (*ImgFactory) InsertText ¶
func (dst *ImgFactory) InsertText(font string, size float64, col []int, x, y float64, txt string) *ImgFactory
InsertText 插入文本
func (*ImgFactory) InsertUp ¶
func (dst *ImgFactory) InsertUp(im image.Image, w, h, x, y int) *ImgFactory
InsertUp 上部插入图片
func (*ImgFactory) InsertUpC ¶
func (dst *ImgFactory) InsertUpC(im image.Image, w, h, x, y int) *ImgFactory
InsertUpC 上部插入图片 x,y是中心点
Click to show internal directories.
Click to hide internal directories.