Canvas

Create a new empty canvas.

Parameters

ParameterTypeDescription

width

int

Width of the canvas.

height

int

Height of the canvas.

fillColor

color.Color

Color of the canvas. Optional parameter, default is transparent.

Return Values

The instance of *imgo.Image .

Examples

package main

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

func main() {
    imgo.Canvas(500, 500, color.White).
        Save("out.png")
}

Last updated