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 Bytesarrow-up-right.

Following image formats are supported in ImGo.

Formats
Mimetype

jpg

image/jpeg

png

image/png

bmp

image/x-ms-bmp

tiff

image/tiff

webp

image/webp

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:

Last updated