// GetFingerprint fingerprints a file.
GetFingerprint fingerprints a file.
// GetFingerprint fingerprints a file .
func GetFingerprint(extension string, reader io.Reader, f decoder.MediaDecoder) *structs.Analysis {
	img, err := f.Decode(extension, reader)
	if err != nil {
		log.Printf("GetFingerprint: unable to decode file with extension %s: %s\n", extension, err)
		return &structs.Analysis{FingerprintErrorString: err.Error()}
	}
	fr, err := fingerprint(img)
	if err != nil {
		return &structs.Analysis{Fingerprint: fr, FingerprintErrorString: err.Error()}
	}
	return &structs.Analysis{Fingerprint: fr}
}
func GetFingerprint ( extension string , reader io . Reader , f decoder . MediaDecoder ) * structs . Analysis { img , err := f . Decode ( extension , reader ) if err != nil { log . Printf ( " \n " , extension , err ) return & structs . Analysis { FingerprintErrorString : err . Error ( ) } } fr , err := fingerprint ( img ) if err != nil { return & structs . Analysis { Fingerprint : fr , FingerprintErrorString : err . Error ( ) } } return & structs . Analysis { Fingerprint : fr } }
GetFingerprint fingerprints a file.
GetFingerprint fingerprints a file .