Documentation ¶
Overview ¶
Package util contains utility code for demosntration of go-libjpeg.
Index ¶
- Variables
- func CreateFile(name string) (f *os.File)
- func GetExFilePath(name string) string
- func GetOutFilePath(name string) string
- func MatchColor(a, b color.Color, tolerance int) (matched bool)
- func MatchImage(a, b image.Image, tolerance int) (diff image.Image, err error)
- func OpenFile(name string) (io io.Reader)
- func ReadFile(name string) (data []byte)
- func WritePNG(img image.Image, name string)
Constants ¶
This section is empty.
Variables ¶
View Source
var SubsampledImages = []string{
"checkerboard_444.jpg",
"checkerboard_440.jpg",
"checkerboard_422.jpg",
"checkerboard_420.jpg",
}
SubsampledImages contains example images which have subsampling colors.
Functions ¶
func GetExFilePath ¶
GetExFilePath returns the path of specified example file.
func GetOutFilePath ¶
GetOutFilePath returns the path of specified out file.
func MatchColor ¶
MatchColor returns whteher the difference between two colors is smaller than the given tolerance. If the two colors a and b assume to the same, it returns true.
func MatchImage ¶
MatchImage matches by pixel-by-pixel. If any one of pixel does not matched, it returns an error with image difference (a - b).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.