Grayscale

将图像转为 8 位颜色的灰度图。

参数

返回值

*imgo.Image 类型的实例。

例子

package main

import (
    "github.com/fishtailstudio/imgo"
)

func main() {
    imgo.Load("gopher.png").
        Grayscale().
        Save("out.png")
}

转为灰度图后仍然可以继续编辑:

将转为灰度图的图像插入到其他图像上,并不会影响其他图像的色彩空间。下例输出的仍为 RGBA 图像。

最后更新于