Versions in this module Expand all Collapse all v0 v0.2.0 Feb 1, 2026 Changes in this version + var ErrImageNotFound = errors.New("image not found in meta data") + var ErrNotEnoughSprites = errors.New("could not load sprites from file") + var ErrNotEnoughTabs = errors.New("could not load offsets from tab file") + var ErrNotImplemented = errors.New("not implemented yet") + var ErrPaletteNotFound = errors.New("color pallete not found") + var ErrUnsupportedTABOffset = errors.New("unsupported offset size for TAB file") + var Images = map[string]ImageEntry + func LoadTAB(path string, offsetSize int) ([]int, error) + type ImageCollection struct + SpriteWidth int + Sprites []*ImageResource + func LoadImageCollectionFromPCK(path string, width int, offsets []int) (*ImageCollection, error) + func (c *ImageCollection) Animated(delay int, height int, palette *Palette) *gif.GIF + func (c *ImageCollection) Gallery(numberPerRow int, rowHeight int, palette *Palette) (image.Image, error) + type ImageEntry struct + Format ImageFormat + Height int + PaletteNr int + TabFile string + TabOffset int + Width int + type ImageFormat int + const ImageFormatPCK + const ImageFormatSCR + const ImageFormatSPK + const ImageFormatUnknown + type ImageResource struct + func LoadPCK(path string, width int, offset int) (*ImageResource, error) + func LoadSCR(path string, width int) (*ImageResource, error) + func LoadSPK(path string) (*ImageResource, error) + func (i *ImageResource) Height() int + func (i *ImageResource) Image(palette *Palette) image.Image + func (i *ImageResource) Paletted(palette *Palette) *image.Paletted + func (i *ImageResource) Width() int + type Palette struct + Buffer []byte + Colors [256]color.Color + func LoadPalettes(path string) ([]*Palette, error) + func (p *Palette) Palette() *color.Palette + func (p *Palette) Unpack(buf []byte, order binary.ByteOrder) ([]byte, error) + func (p Palette) SizeOf() int + type ResourceLoader struct + func NewResourceLoader(root string) (*ResourceLoader, error) + func (rs *ResourceLoader) LoadImage(pth string) (image.Image, error) + func (rs *ResourceLoader) LoadImageWithPalette(pth string, paletteNr int) (image.Image, error)