Versions in this module Expand all Collapse all v1 v1.1.2 Jan 28, 2024 v1.1.1 Jan 24, 2024 v1.1.0 Dec 23, 2023 v1.0.10 Dec 23, 2023 v1.0.9 Apr 1, 2023 v1.0.8 Apr 1, 2023 v1.0.6 Apr 1, 2023 v1.0.5 Mar 31, 2023 v1.0.4 Mar 31, 2023 v1.0.3 Mar 26, 2023 v1.0.2 Mar 19, 2023 Changes in this version type Image + BPC int v1.0.1 Jan 7, 2023 v1.0.0 Jan 5, 2023 Changes in this version + const DefaultFormat + const ExitDimensionsNotEqual + const ExitEmptyImage + const ExitFSFail + const ExitInvalidInput + const ExitMissingImage + const ExitOk + const ExitUnknown + const ExitUnknownFormat + const FormatGIF + const FormatJPEG + const FormatPNG + const YIQDeltaMax + var ErrCannotWriteOutputDiff = errors.New("Cannot write diff output") + var ErrCorruptedImage = errors.New("Image data is corrupted") + var ErrDimensionsDoNotMatch = errors.New("Images dimensions do not match") + var ErrImageIsEmpty = errors.New("One or both images are empty") + var ErrInvalidColorFormat = errors.New("Invalid color format") + var ErrMissingImage = errors.New("One or both images are missing") + var ErrUnknownFormat = errors.New("Unknown image format") + func GetVersion() string + func HexStringToColor(hexstr string) (*color.RGBA, error) + type Color struct + A uint32 + B uint32 + G uint32 + R uint32 + func NewColor(r, g, b, a uint32) *Color + func (c Color) Blend(a float64) *Color + func (c Color) BlendToGray(a float64) color.Color + func (c Color) Equals(c2 *Color) bool + func (c Color) I() float64 + func (c Color) Q() float64 + func (c Color) RGBA() (r, g, b, a uint32) + func (c Color) String() string + func (c Color) Y() float64 + func (c Color) YIQ() (float64, float64, float64) + type Image struct + Format string + Path string + PixData []uint32 + func NewImage(w, h int, format string) *Image + func NewImageFromPath(path string) (*Image, error) + func (img *Image) Antialiased(img2 *Image, pt image.Point) bool + func (img *Image) Bytes() []byte + func (img *Image) BytesPerColor() int + func (img *Image) ColorDelta(img2 *Image, m, n int, onlyY bool) float64 + func (img *Image) Compare(img2 *Image, opts *Options) (int, error) + func (img *Image) DimensionsEqual(img2 *Image) bool + func (img *Image) Empty() bool + func (img *Image) Identical(img2 *Image) bool + func (img *Image) Load(rd io.Reader) (err error) + func (img *Image) Position(p image.Point) int + func (img *Image) SameNeighbors(pt image.Point, n int) bool + func (img *Image) Save(wr io.Writer) (err error) + func (img *Image) Size() int + func (img *Image) Stride() int + func (img *Image) Uint32() []uint32 + type Options struct + AAColor color.Color + Alpha float64 + DiffColor color.Color + DiffColorAlt color.Color + DiffMask bool + IncludeAA bool + KeepEmptyDiff bool + Output io.Writer + Threshold float64 + func NewOptions() *Options + func (opts *Options) SetAAColor(v color.Color) *Options + func (opts *Options) SetAlpha(v float64) *Options + func (opts *Options) SetDiffColor(v color.Color) *Options + func (opts *Options) SetDiffColorAlt(v color.Color) *Options + func (opts *Options) SetDiffMask(v bool) *Options + func (opts *Options) SetIncludeAA(v bool) *Options + func (opts *Options) SetKeepEmptyDiff(v bool) *Options + func (opts *Options) SetOutput(v io.Writer) *Options + func (opts *Options) SetThreshold(v float64) *Options + type Version struct + Major int + Minor int + Patch int + Pre string + func (v Version) String() string