func Encode(format string, w io.Writer, m image.Image, opt Options) error {
	for _, f := range formats {
		if f.Name == format {
			return f.Encode(w, m, opt)
		}
	}
	return image.ErrFormat
}
// Encode encodes an image as a registered format.
// The format is the format name used during format registration.
// Format registration is typically done by an init function in the codec-
// specific package.
Encode encodes an image as a registered format.
The format is the format name used during format registration.
Format registration is typically done by an init function in the codec
specific package.
// Encode encodes an image as a registered format . // The format is the format name used during format registration . // Format registration is typically done by an init function in the codec - // specific package .
func Encode(format string, w io.Writer, m image.Image, opt Options) error {
	for _, f := range formats {
		if f.Name == format {
			return f.Encode(w, m, opt)
		}
	}
	return image.ErrFormat
}
func Encode ( format string , w io . Writer , m image . Image , opt Options ) error { for _ , f := range formats { if f . Name == format { return f . Encode ( w , m , opt ) } } return image . ErrFormat }
Encode encodes an image as a registered format.
Encode encodes an image as a registered format .