image

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 2 Imported by: 11

Documentation

Overview

Package image contains a struct to store the data of an image.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data interface {
	RGBAt(x, y int) color.RGB
	Size() (int, int)
}

type RGBData added in v1.1.3

type RGBData struct {
	// contains filtered or unexported fields
}

RGBData store pixel data in an image.

func NewData

func NewData(w, h int) RGBData

NewData creates a empty RGBData given a width and height.

func ToData

func ToData(image image.Image) RGBData

ToData converts an image.Image to a RGBData.

func (RGBData) RGBAt added in v1.1.3

func (data RGBData) RGBAt(x, y int) color.RGB

RGBAt returns a color.RGB given a coordinate.

func (RGBData) Size added in v1.1.3

func (data RGBData) Size() (int, int)

Size returns the dimensions of the image data.

Jump to

Keyboard shortcuts

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