go image processing

Go 图像处理基础

前言 Go 语言的官方包 image 和 image/color 定义了非常多的类型,涵盖了很多的图像处理基础内容,本文简单介绍这些库中的基本概念和使用方法。 常见类型介绍 Colors Colors 是一个接口,它的代码如下: type Color interface { // RGBA returns the alpha-premultiplied red, green, blue and alpha values // for the color. Each value ranges within [0, 0xffff], but is represented // by a uint32 so that multiplying by a blend factor up to 0xffff will not // overflow. // // An alpha-premultiplied color component c has been scaled by alpha (a), // so has valid values 0 <= c <= a....

八月 12, 2022 · Aimer Neige