ico

package
v0.0.0-...-8b1022e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2016 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package ico describes Windows ICO file format.

Index

Constants

View Source
const (
	BI_RGB = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BITMAPINFOHEADER

type BITMAPINFOHEADER struct {
	Size          uint32
	Width         int32
	Height        int32  // NOTE: "represents the combined height of the XOR and AND masks. Remember to divide this number by two before using it to perform calculations for either of the XOR or AND masks."
	Planes        uint16 // [BMP/DIB]: "is always 1"
	BitCount      uint16
	Compression   uint32 // for ico = 0
	SizeImage     uint32
	XPelsPerMeter int32  // for ico = 0
	YPelsPerMeter int32  // for ico = 0
	ClrUsed       uint32 // for ico = 0
	ClrImportant  uint32 // for ico = 0
}

type ICO

type ICO struct {
	image.Image
}

type ICONDIR

type ICONDIR struct {
	Reserved uint16 // must be 0
	Type     uint16 // Resource Type (1 for icons)
	Count    uint16 // How many images?
}

type ICONDIRENTRY

type ICONDIRENTRY struct {
	IconDirEntryCommon
	ImageOffset uint32 // Where in the file is this image? [from beginning of file]
}

func DecodeHeaders

func DecodeHeaders(r io.Reader) ([]ICONDIRENTRY, error)

type IconDirEntryCommon

type IconDirEntryCommon struct {
	Width      byte   // Width, in pixels, of the image
	Height     byte   // Height, in pixels, of the image
	ColorCount byte   // Number of colors in image (0 if >=8bpp)
	Reserved   byte   // Reserved (must be 0)
	Planes     uint16 // Color Planes
	BitCount   uint16 // Bits per pixel
	BytesInRes uint32 // How many bytes in this resource?
}

type RGBQUAD

type RGBQUAD struct {
	Blue     byte
	Green    byte
	Red      byte
	Reserved byte // must be 0
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL