Documentation ¶
Overview ¶
Package img gg 的简易封装
Index ¶
- Variables
- func GetPaletted(im image.Image) *image.Paletted
- func Limit(img image.Image, xmax, ymax int) image.Image
- func Load(path string) (img image.Image, err error)
- func LoadAllFrames(path string, w, h int) ([]*image.NRGBA, error)
- func MergeGif(delay int, im []*image.NRGBA) *gif.GIF
- type Factory
- func LoadFirstFrame(path string, w, h int) (*Factory, error)
- func MergeH(im []*image.NRGBA) *Factory
- func MergeW(im []*image.NRGBA) *Factory
- func NewFactory(w, h int, fillColor color.Color) *Factory
- func Rotate(img image.Image, angle float64, w, h int) *Factory
- func Size(im image.Image, w, h int) *Factory
- func Text(font string, size float64, col []int, col1 []int, txt string) *Factory
- func (dst *Factory) AdjustBrightness(s float64) *Factory
- func (dst *Factory) AdjustContrast(a float64) *Factory
- func (dst *Factory) AdjustSaturation(a float64) *Factory
- func (dst *Factory) Blur(a float64) *Factory
- func (dst *Factory) Circle(r int) *Factory
- func (dst *Factory) Clip(w, h, x, y int) *Factory
- func (dst *Factory) ClipCircle(x, y, r int) *Factory
- func (dst *Factory) ClipCircleFix(x, y, r int) *Factory
- func (dst *Factory) Clone() *Factory
- func (dst *Factory) Convolve3x3() *Factory
- func (dst *Factory) FlipH() *Factory
- func (dst *Factory) FlipV() *Factory
- func (dst *Factory) Grayscale() *Factory
- func (dst *Factory) InsertBottom(im image.Image, w, h, x, y int) *Factory
- func (dst *Factory) InsertBottomC(im image.Image, w, h, x, y int) *Factory
- func (dst *Factory) InsertText(font string, size float64, col []int, x, y float64, txt string) *Factory
- func (dst *Factory) InsertUp(im image.Image, w, h, x, y int) *Factory
- func (dst *Factory) InsertUpC(im image.Image, w, h, x, y int) *Factory
- func (dst *Factory) InsertUpG(im []*image.NRGBA, w, h, x, y int) []*image.NRGBA
- func (dst *Factory) Invert() *Factory
- func (dst *Factory) Reshape(w, h int) *Factory
- func (dst *Factory) Sharpen(a float64) *Factory
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色
func LoadAllFrames ¶
LoadAllFrames 加载图片每一帧图片
Types ¶
type Factory ¶
Factory 处理中图像
func LoadFirstFrame ¶
LoadFirstFrame 载入图片第一帧作底图
func (*Factory) AdjustBrightness ¶
AdjustBrightness 亮度(-100, 100)
func (*Factory) AdjustContrast ¶
AdjustContrast 对比度(-100, 100)
func (*Factory) AdjustSaturation ¶
AdjustSaturation 饱和度(-100, 100)
func (*Factory) ClipCircleFix ¶
ClipCircleFix 裁取圆图
func (*Factory) InsertBottom ¶
InsertBottom 底部插入图片
func (*Factory) InsertBottomC ¶
InsertBottomC 底部插入图片 x,y是中心点
func (*Factory) InsertText ¶
func (dst *Factory) InsertText(font string, size float64, col []int, x, y float64, txt string) *Factory
InsertText 插入文本
Click to show internal directories.
Click to hide internal directories.