Documentation ¶
Overview ¶
Package ico implements an ICO file decoder and encoder.
Example ¶
b, _ := os.ReadFile("icon_32x32-32.png") m1, _ := png.Decode(bytes.NewReader(b)) b, _ = os.ReadFile("icon_256x256-32.png") m2, _ := png.Decode(bytes.NewReader(b)) f, _ := os.Create("icon.ico") ico.EncodeAll(f, []image.Image{m1, m2}) f.Close()
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode reads an ICO image from r and returns the largest stored icon as an image.Image.
func DecodeConfig ¶
DecodeConfig returns the color model and dimensions of the largest icon stored in an ICO image without decoding the entire icon.
Types ¶
type FormatError ¶
type FormatError string
FormatError reports that the input is not a valid ICO.
func (FormatError) Error ¶
func (e FormatError) Error() string
type UnsupportedError ¶
type UnsupportedError string
UnsupportedError reports that the input uses a valid but unimplemented ICO feature.
func (UnsupportedError) Error ¶
func (e UnsupportedError) Error() string
Click to show internal directories.
Click to hide internal directories.