image

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateContrast added in v0.3.1

func CalculateContrast(img image.Image) float64

CalculateContrast 计算图片对比度

func CalculateOverlap added in v0.1.13

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

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

func CalculateOverlapReuseMemory added in v0.3.0

func CalculateOverlapReuseMemory(img1, img2 image.Image, col bool, minOverlap, maxOverlap int, gary1, gary2 []uint8) int

func MergeUniformBoundsImagesByOverlap added in v0.3.0

func MergeUniformBoundsImagesByOverlap(imgIdxs [][]int, getImage func(int) image.Image, imgWidth, imgHeight int,
	horizontalOverlaps, verticalOverlaps []int) image.Image

有一定重合的固定大小的图片拼图

func MergeUniformBoundsImagesByOverlapReuseMemory added in v0.3.0

func MergeUniformBoundsImagesByOverlapReuseMemory(imgIdxs [][]int, getImage func(int) image.Image, imgWidth, imgHeight int,
	horizontalOverlaps, verticalOverlaps []int, result *image.RGBA)

func RectClipInBounds added in v0.3.4

func RectClipInBounds(rect *image.Rectangle, imgWidth, imgHeight int)

func RectRotateByCenter added in v0.3.0

func RectRotateByCenter(x, y, l, w int, angle float64) []image.Point

func RectUnionPoint added in v0.3.4

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

func ToGary added in v0.3.1

func ToGary(img image.Image) *image.Gray

func ToGaryReuseMemory added in v0.3.1

func ToGaryReuseMemory(img image.Image, gary *image.Gray)

func Transfer added in v0.2.0

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

Types

type AveragePoolImage added in v0.3.1

type AveragePoolImage struct {
	Rect image.Rectangle
	// contains filtered or unexported fields
}

func NewAveragePoolImage added in v0.3.1

func NewAveragePoolImage(img image.Image, reductionFactor int) *AveragePoolImage

func (*AveragePoolImage) At added in v0.3.1

func (img *AveragePoolImage) At(x, y int) color.Color

func (*AveragePoolImage) Bounds added in v0.3.1

func (img *AveragePoolImage) Bounds() image.Rectangle

func (*AveragePoolImage) ColorModel added in v0.3.1

func (img *AveragePoolImage) ColorModel() color.Model

type Circle added in v0.3.4

type Circle struct {
	Center image.Point
	Radius int
}

type CircularArc added in v0.3.4

type CircularArc struct {
	Center image.Point
	Start  image.Point
	End    image.Point
}

counter clockwise if clockwise ,startX,startY <-> endX, endY

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

type Line added in v0.3.4

type Line struct {
	Start image.Point
	End   image.Point
}

type LineCap added in v0.3.4

type LineCap int
const (
	// LineCapButt strokes do not extend beyond a line's two endpoints.
	LineCapButt LineCap = iota
	// LineCapRound strokes will be extended by a half circle with a diameter equal to the stroke width.
	LineCapRound
)

type MergeImage added in v0.3.0

type MergeImage struct {
	Pixes [][]image.Image

	Rect image.Rectangle
	// contains filtered or unexported fields
}

func NewMergeImage added in v0.3.1

func NewMergeImage(imgs [][]image.Image, width, height int, horizontalOverlaps, verticalOverlaps []int) *MergeImage

func (*MergeImage) At added in v0.3.1

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

func (*MergeImage) Bounds added in v0.3.1

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

func (*MergeImage) ColorModel added in v0.3.1

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

func (*MergeImage) ImgOffset added in v0.3.1

func (m *MergeImage) ImgOffset(x, y int) image.Image

type Polygon added in v0.3.4

type Polygon []image.Point

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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