image

package
v0.0.0-...-49fd1ef Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2016 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrayFloat32

type GrayFloat32 struct {
	// Pix holds the image's pixels, as gray values in big-endian format. The pixel at
	// (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*2].
	Pix []uint8
	// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
	Stride int
	// Rect is the image's bounds.
	Rect image.Rectangle
}

GrayFloat32 is an in-memory image whose At method returns GrayFloat32 values.

func NewGrayFloat32

func NewGrayFloat32(r image.Rectangle) *GrayFloat32

NewGrayFloat32 returns a new GrayFloat32 image with the given bounds.

func (*GrayFloat32) At

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

func (*GrayFloat32) Bounds

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

func (*GrayFloat32) ColorModel

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

func (*GrayFloat32) GrayFloat32At

func (p *GrayFloat32) GrayFloat32At(x, y int) mycolor.GrayFloat32

func (*GrayFloat32) Opaque

func (p *GrayFloat32) Opaque() bool

Opaque scans the entire image and reports whether it is fully opaque.

func (*GrayFloat32) PixOffset

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

PixOffset returns the index of the first element of Pix that corresponds to the pixel at (x, y).

func (*GrayFloat32) Set

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

func (*GrayFloat32) SetGrayFloat32

func (p *GrayFloat32) SetGrayFloat32(x, y int, c mycolor.GrayFloat32)

func (*GrayFloat32) SubImage

func (p *GrayFloat32) SubImage(r image.Rectangle) image.Image

SubImage returns an image representing the portion of the image p visible through r. The returned value shares pixels with the original image.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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