Go语言学习之image、image/color、image/png、image/jpeg包(the way to go)

水深无声 2022-06-13 07:14 536阅读 0赞

生命不止,继续 go go go !!!

golang同样为我们提供了很多关于图片处理的标准库,这里与大家一起学习分享。

image package

作用:
Package image implements a basic 2-D image library.
image包实现了一个基本的2D图像库.

方法:
func NewNRGBA

  1. func NewNRGBA(r Rectangle) *NRGBA

NewNRGBA returns a new NRGBA image with the given bounds.

什么是NRGBA?
NRGBA is an in-memory image whose At method returns color.NRGBA values.

  1. type NRGBA struct {
  2. Pix []uint8
  3. Stride int
  4. Rect Rectangle
  5. }

func (*NRGBA) Set

发表评论

表情:
评论列表 (有 0 条评论,536人围观)

还没有评论,来说两句吧...

相关阅读