imageutil

package
v0.0.0-...-5d631fd Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsRGBA

func AsRGBA(src image.Image) *image.RGBA

func ColorDelta

func ColorDelta(c1 color.RGBA, c2 color.RGBA) uint32

func ImageCompare

func ImageCompare(imgA image.Image, imgB image.Image) float64

ImageCompare compares two images

Returns: likeness factor between 0.0 and 1.0.

If any pixel is not fully opaque (alpha of 0xff) in either image, that pixel is not compared. The comparison assumes that the two images are of the same size.

func OffsetRect

func OffsetRect(base image.Rectangle, offset image.Rectangle) image.Rectangle

OffsetRect offsets the base rectangle by offset.Min

This is useful for cropping an image that is already cropped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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