bitmap

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color = bitmap.Color
const Black Color = true
const White Color = false

type Image

type Image struct {
	Pix    []uint8
	Stride int
	Rect   image.Rectangle
}

Image is a binary image.

func Import

func Import(img *bitmap.Image) *Image

func New

func New(r image.Rectangle) *Image

func (*Image) BinaryAt

func (img *Image) BinaryAt(x, y int) Color

func (*Image) Clone

func (img *Image) Clone() *Image

Clone returns a clone of img.

func (*Image) Copy

func (img *Image) Copy(from *Image) *Image

func (*Image) EncodePBM

func (img *Image) EncodePBM(w io.Writer) error

func (*Image) Export

func (img *Image) Export() *bitmap.Image

func (*Image) Mask

func (img *Image) Mask(in, mask, pattern *Image) *Image

func (*Image) OnesCount

func (img *Image) OnesCount() int

OnesCount returns the number of 1-pixels (black-pixels).

func (*Image) Point

func (img *Image) Point() int

func (*Image) PointMicro

func (img *Image) PointMicro() int

func (*Image) SetBinary

func (img *Image) SetBinary(x, y int, c Color)

func (*Image) XorBinary

func (img *Image) XorBinary(x, y int, c Color)

Jump to

Keyboard shortcuts

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