README ¶
ico
This is a simple module library for building windows ICO files that may some day be complete.
The module features an abstraction type for icon files so they can be decoded as well as encoded.
Features that I intend to include are:
- Encoding of PNG images (like most golang ico modules)
- Encoding of BMP images
- Encoding of paletted images
- Encoding of paletted images with alpha
- Decoding of ICO files
Example usage
img := image.NewRGBA(image.Rect(0,0,32,32))
eudenil := color.RGBA{164, 184, 135}
draw.Draw(img, img.Bounds(), &image.Uniform{eudenil}, image.ZP, draw.Src)
icon := ico.NewIcon()
icon.AddPng(img)
bytes, err := icon.Encode()
Documentation ¶
Overview ¶
Copyright 2022 Staffan Thomen <staffan@thomen.fi> Use of this source code is governed by a BSD-style license found in the adjacent LICENSE file.
Index ¶
Constants ¶
View Source
const BMP = 1
View Source
const CUR = 2
View Source
const ICO = 1
file type, icon or cursor
View Source
const NOALPHA = -1
View Source
const PNG = 0
determine subimage type
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.