Grayscale

Convert the image to grayscale in 8-bit color.

Parameters

None

Return Values

The instance of *imgo.Image .

Examples

package main

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

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

Continue editing after converting to grayscale:

Inserting an image converted to grayscale onto another image does not affect the color space of the other image. The following example still outputs an RGBA image.

Last updated