cmpimg

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package cmpimg compares the raw representation of images taking into account idiosyncracies related to their underlying format (SVG, PDF, PNG, ...).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(typ string, raw1, raw2 []byte) (bool, error)

Equal takes the raw representation of two images, raw1 and raw2, together with the underlying image type ("eps", "jpeg", "jpg", "pdf", "png", "svg", "tiff"), and returns whether the two images are equal or not.

Equal may return an error if the decoding of the raw image somehow failed.

func EqualApprox

func EqualApprox(typ string, raw1, raw2 []byte, delta float64) (bool, error)

EqualApprox takes the raw representation of two images, raw1 and raw2, together with the underlying image type ("eps", "jpeg", "jpg", "pdf", "png", "svg", "tiff"), a normalized delta parameter to describe how close the matching should be performed (delta=0: perfect match, delta=1, loose match) and returns whether the two images are equal or not.

EqualApprox may return an error if the decoding of the raw image somehow failed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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