Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertToRGBA(img image.Image) (*image.RGBA, error)
- func YCbCrToRGBA(ycbcr *image.YCbCr) (*image.RGBA, error)
- type Hash1024
- func AverageHash(in image.Image) (Hash1024, error)
- func DifferenceHash(in image.Image) (Hash1024, error)
- func Hash1024FromBytes(data []byte) (Hash1024, error)
- func Hash1024FromString(s string) (Hash1024, error)
- func PerceptionHash(in image.Image) (Hash1024, error)
- func WaveletHash(in image.Image) (Hash1024, error)
- type Hash64
Examples ¶
Constants ¶
View Source
const ( AppName string = "fastimagehash" Version string = "0.0.3" )
Variables ¶
View Source
var ( ErrHalideBufferRGBA = errors.New("failed to create_halide_buffer_rgba") ErrHalideBufferYUV = errors.New("failed to create_halide_buffer_yuv") ErrHalideBuffer2DUint8 = errors.New("failed to create_halide_buffer_2d_uint8") ErrHalideBuffer2DFloat32 = errors.New("failed to create_halide_buffer_2d_float") )
View Source
var ( ErrHaarX = errors.New("failed to haar_x") ErrHaarY = errors.New("failed to haar_y") ErrHaarXY = errors.New("failed to haar_xy") ErrHaarXYHi = errors.New("failed to haar_xy_hi") )
View Source
var ( ErrYUV444ToRGBA = errors.New("failed to yuv444_to_rgba") ErrYUV422ToRGBA = errors.New("failed to yuv422_to_rgba") ErrYUV420ToRGBA = errors.New("failed to yuv420_to_rgba") ErrYUVNotSupportSubsampleRatio = errors.New("not support subsample ratio") )
View Source
var ( ErrScaleNormal = errors.New("failed to scale_normal") ErrScaleBox = errors.New("failed to scale_box") ErrScaleLinear = errors.New("failed to scale_linear") ErrScaleGauss = errors.New("failed to scale_gauss") )
View Source
var (
ErrDCT = errors.New("failed to dct")
)
View Source
var (
ErrGrayscale = errors.New("failed to grayscale")
)
View Source
var (
ErrHash1024InvalidSize = errors.New("invalid hash1024 size")
)
Functions ¶
Types ¶
type Hash1024 ¶
type Hash1024 [16]uint64
Example ¶
h := Hash1024([16]uint64{ 1, 8, 16, 32, 64, 128, 256, 512, 1, 2, 3, 4, 5, 6, 7, }) println(h.Hex())
Output:
func Hash1024FromBytes ¶
func Hash1024FromString ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.