bitmap

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MaskedImage

type MaskedImage struct {
	image.Paletted
	Mask []byte
}

MaskedImage

func (MaskedImage) At

func (i MaskedImage) At(x, y int) color.Color

func (MaskedImage) HasMaskedPixels

func (i MaskedImage) HasMaskedPixels() bool

type RGBA16Image

type RGBA16Image struct {
	// Pix holds the image's pixels, as packed little-endian RGBA16 colors.
	Pix []byte

	// Rect is the image's bounds.
	Rect image.Rectangle
}

RGBA16Image is a bitmap with 16-bit colors.

func NewRGBA16Image

func NewRGBA16Image(r image.Rectangle) *RGBA16Image

NewRGBA16Image returns a new RGBA16Image with the given bounds.

func ToRGBA16Image

func ToRGBA16Image(i image.Image) *RGBA16Image

ToRGBA16Image converts the supplied image to RGBA16Image.

func (*RGBA16Image) At

func (i *RGBA16Image) At(x, y int) color.Color

At returns the color of the pixel at (x, y).

func (*RGBA16Image) Bounds

func (i *RGBA16Image) Bounds() image.Rectangle

Bounds returns the domain for which At can return non-zero color.

func (*RGBA16Image) ColorModel

func (i *RGBA16Image) ColorModel() color.Model

ColorModel returns the color model for the image.

func (*RGBA16Image) ReadFrom

func (i *RGBA16Image) ReadFrom(r io.Reader) (n int64, err error)

ReadFrom reads an encoded image from the supplied Reader.

func (*RGBA16Image) Set

func (i *RGBA16Image) Set(x, y int, c color.Color)

Set the color of the pixel at (x, y).

func (*RGBA16Image) WriteTo

func (i *RGBA16Image) WriteTo(w io.Writer) (n int64, err error)

WriteTo writes an encoded image to the supplied Writer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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