image

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColorModel = color.ModelFunc(rgbModel)

ColorModel is RGB color model instance

Functions

This section is empty.

Types

type RGB

type RGB struct {
	R, G, B uint8
}

RGB color

func (RGB) RGBA

func (c RGB) RGBA() (r, g, b, a uint32)

RGBA implements Color.RGBA

type RGB24

type RGB24 struct {
	// Pix holds the image's stream, in RGB order.
	Pix []uint8
	// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
	Stride int
	// Rect is the image's bounds.
	Rect image.Rectangle
}

func NewRGB24 added in v1.6.7

func NewRGB24(r image.Rectangle) *RGB24

func (*RGB24) At

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

At implements image.Image.At

func (*RGB24) Bounds

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

Bounds implements image.Image.At

func (*RGB24) ColorModel

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

ColorModel returns RGB color model.

func (*RGB24) RGBAAt

func (p *RGB24) RGBAAt(x, y int) color.RGBA

RGBAAt returns the color of the pixel at (x, y) as RGBA.

func (*RGB24) Set added in v1.6.7

func (p *RGB24) Set(x, y int, c color.Color)

Jump to

Keyboard shortcuts

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