image

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateOverlap added in v0.1.13

func CalculateOverlap(img1, img2 image.Image, row bool, minOverlap, maxOverlap int) int

计算两张图的重合像素,第一张的图的后半部分和第二张的前半部分

func ColorToGray added in v0.1.13

func ColorToGray(c color.Color) uint8

func MergeImages added in v0.1.13

func MergeImages(imgs [][]int, getImage func(int) image.Image, bounds image.Rectangle, horizontalOverlaps,
	verticalOverlaps []int) image.Image

func RGBAToGray added in v0.1.13

func RGBAToGray(c color.RGBA) uint8

func RGBToGray added in v0.1.13

func RGBToGray(c color.RGBA) uint8

func Transfer added in v0.2.0

func Transfer(src, dst string, decode Decode, encode Encode) error

func Union added in v0.1.2

func Union(rect image.Rectangle, p image.Point) image.Rectangle

Types

type BGR added in v0.2.0

type BGR struct {
	Pix []uint8
	// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
	Stride int // 3 * r.Dx()
	// Rect is the image's bounds.
	Rect image.Rectangle
}

func (*BGR) At added in v0.2.0

func (r *BGR) At(x, y int) color.Color

func (*BGR) Bounds added in v0.2.0

func (r *BGR) Bounds() image.Rectangle

func (*BGR) ColorModel added in v0.2.0

func (r *BGR) ColorModel() color.Model

func (*BGR) PixOffset added in v0.2.0

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

type Decode added in v0.2.0

type Decode func(r io.Reader) (image.Image, error)

type Encode added in v0.2.0

type Encode func(io.Writer, image.Image) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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