paletted

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Unlicense Imports: 3 Imported by: 0

Documentation

Overview

Package paletted implements a image.Paletted replacement with a more compact encoding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Pix     []uint8
	Rect    Rectangle
	Palette Palette
}

Image is like image.Paletted with a more efficient palette.

func (*Image) At

func (p *Image) At(x, y int) color.Color

func (*Image) Bounds

func (p *Image) Bounds() image.Rectangle

func (*Image) ColorModel

func (p *Image) ColorModel() color.Model

func (*Image) PixOffset

func (p *Image) PixOffset(x, y int) int

func (*Image) RGBA64At

func (p *Image) RGBA64At(x, y int) color.RGBA64

type Palette

type Palette []byte

Palette is a list of RGBA colors encoded as a byte slice.

func (Palette) At

func (p Palette) At(i uint8) color.RGBA

type Rectangle

type Rectangle struct {
	MinX, MinY int16
	MaxX, MaxY int16
}

func (Rectangle) Rect

func (r Rectangle) Rect() image.Rectangle

Jump to

Keyboard shortcuts

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