Supported Formats

Image & color supported formats

Image Formats

The format of an image is judged by the first few bytes of the image, which are called Magic Numbers or Magic Bytes.

Following image formats are supported in ImGo.

Color Formats

ImGo only supports color types that implement the color.Color interface.

It is recommended to use the color of golang.org/x/image/colornames package, which contains a large number of commonly defined colors.

colornames.Blueviolet
colornames.Gold
colornames.Darkblue
colornames.Tomato

You can also use the colors of the buildin package image/color, which has only a few defined colors.

color.Black
color.White
color.Transparent

Colors can also be customized:

color.RGBA{255, 255, 0, 255}

Last updated