monochrome

package
v0.0.0-...-797c769 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Model

func Model() color.Palette

Types

type Image

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

Image is an image with black data on a white background.

func From

func From(img image.Image) *Image

From converts an image to monochrome with Otsu thresholding. https://en.wikipedia.org/wiki/Otsu%27s_method

func New

func New(r image.Rectangle) *Image

func (*Image) At

func (m *Image) At(x, y int) color.Color

func (*Image) BlackAt

func (m *Image) BlackAt(x, y int) bool

func (*Image) Bounds

func (m *Image) Bounds() image.Rectangle

func (*Image) ColorIndexAt

func (m *Image) ColorIndexAt(x, y int) uint8

func (*Image) ColorModel

func (m *Image) ColorModel() color.Model

func (*Image) Set

func (m *Image) Set(x, y int, c color.Color)

func (*Image) SetBlack

func (m *Image) SetBlack(x, y int, isBlack bool)

Jump to

Keyboard shortcuts

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