Documentation ¶
Overview ¶
Package im8 provides a 6- or 8-bit image format.
Index ¶
- type Im8
- func (i *Im8) At(x, y int) color.Color
- func (i *Im8) Bounds() image.Rectangle
- func (i *Im8) Col8At(x, y int) col8.Col8
- func (i *Im8) ColorModel() color.Model
- func (i *Im8) Opaque() bool
- func (i *Im8) PixOffset(x, y int) int
- func (i *Im8) Set(x, y int, c color.Color)
- func (i *Im8) SetCol8(x, y int, c col8.Col8)
- func (i *Im8) SubImage(r image.Rectangle) image.Image
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Im8 ¶
type Im8 struct { // Pix holds the image's pixels. The pixel at (x, y) is at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)]. Pix []uint8 // Stride is the Pix stride (in bytes) between vertically adjacent pixels. Stride int // Rect is the image's bounds. Rect image.Rectangle }
Im8 is an in-memory image whose At method returns col8.Col8 values.
func (*Im8) At ¶
At returns the color of the pixel at (x, y). At(Bounds().Min.X, Bounds().Min.Y) returns the upper-left pixel of the grid. At(Bounds().Max.X-1, Bounds().Max.Y-1) returns the lower-right one.
func (*Im8) Bounds ¶
Bounds returns the domain for which At can return non-zero color. The bounds do not necessarily contain the point (0, 0).
func (*Im8) ColorModel ¶
ColorModel returns the Image's color model.
func (*Im8) PixOffset ¶
PixOffset returns the index of the element of Pix that corresponds to the pixel at (x, y).
Click to show internal directories.
Click to hide internal directories.