Lines Matching refs:Format
13 // ErrFormat indicates that decoding encountered an unknown format.
14 var ErrFormat = errors.New("image: unknown format")
16 // A format holds an image format's name, magic header and how to decode it.
17 type format struct {
24 var formats []format
26 // RegisterFormat registers an image format for use by Decode.
27 // Name is the name of the format, like "jpeg" or "png".
28 // Magic is the magic prefix that identifies the format's encoding. The magic
33 formats = append(formats, format{name, magic, decode, decodeConfig})
63 // Sniff determines the format of r's data.
64 func sniff(r reader) format {
71 return format{}
74 // Decode decodes an image that has been encoded in a registered format.
75 // The string returned is the format name used during format registration.
76 // Format registration is typically done by an init function in the codec-
89 // been encoded in a registered format. The string returned is the format name
90 // used during format registration. Format registration is typically done by