Documentation
¶
Index ¶
- func CopyDir(srcDir, dstDir string) error
- func DecodeImageFromBytes(data []byte) (image.Image, error)
- func DiffImagesPink(img1, img2 image.Image) (diff *image.RGBA, mismatch float64)
- func DiffImagesPinkWithBounds(img1, img2 image.Image) (diff *image.RGBA, mismatch float64)
- func LoadImage(path string) (image.Image, error)
- func SaveImage(path string, img image.Image) error
- type DimensionDiff
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeImageFromBytes ¶ added in v0.8.0
DecodeImageFromBytes decodes an image from a byte slice
func DiffImagesPink ¶ added in v0.8.0
DiffImagesPink compares two images and creates a diff image with pink highlights Only compares the overlapping region (intersection of both bounds)
func DiffImagesPinkWithBounds ¶ added in v0.18.0
DiffImagesPinkWithBounds compares two images and highlights out-of-bounds areas The diff image covers the union of both image bounds
Types ¶
type DimensionDiff ¶ added in v0.18.0
type DimensionDiff struct {
WidthDiff int // positive = test wider, negative = test narrower
HeightDiff int // positive = test taller, negative = test shorter
}
DimensionDiff holds dimension difference information
func CompareDimensions ¶ added in v0.18.0
func CompareDimensions(img1, img2 image.Image) (same bool, diff DimensionDiff)
CompareDimensions checks if two images have the same dimensions
Click to show internal directories.
Click to hide internal directories.