func WriteImageFile(path string, img image.Image) error {
	f, errNew := os.Create(path)
	defer f.Close()
	if errNew != nil {
		return errNew
	}
	ft := getFileType(path)
	return WriteImage(img, ft, f)
}
// WriteImage encode by file ext
WriteImage encode by file ext
// WriteImage encode by file ext
func WriteImageFile(path string, img image.Image) error {
	f, errNew := os.Create(path)
	defer f.Close()
	if errNew != nil {
		return errNew
	}
	ft := getFileType(path)
	return WriteImage(img, ft, f)
}
func WriteImageFile ( path string , img image . Image ) error { f , errNew := os . Create ( path ) defer f . Close ( ) if errNew != nil { return errNew } ft := getFileType ( path ) return WriteImage ( img , ft , f ) }
WriteImage encode by file ext
WriteImage encode by file ext