📖
ImGo Documentation
  • GETTING STARTED
    • Introduction
    • Coordinate Axis
    • Supported Formats
    • Update Logs
  • Usage
    • Usage Overview
    • Errors handling
  • API
    • Blur
    • Bounds
    • Canvas
    • Circle
    • Color2Hex
    • Crop
    • Ellipse
    • Extension
    • Filesize
    • Flip
    • GaussianBlur
    • Grayscale
    • Height
    • HttpHandler
    • Insert
    • Load
    • LoadFromBase64
    • LoadFromFile
    • LoadFromImage
    • LoadFromImgo
    • LoadFromPath
    • LoadFromUrl
    • Line
    • MainColor
    • Mimetype
    • Mosaic
    • PickColor
    • Pixel
    • Pixelate
    • RadiusBorder
    • Rectangle
    • Resize
    • Rotate
    • Save
    • String
    • Text
    • Thumbnail
    • ToBase64
    • ToImage
    • Width
Powered by GitBook
On this page
  • Image Formats
  • Color Formats
  1. GETTING STARTED

Supported Formats

Image & color supported formats

PreviousCoordinate AxisNextUpdate Logs

Last updated 2 years ago

Image Formats

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

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:

color.RGBA{255, 255, 0, 255}
Magic Numbers or Magic Bytes