Lines Matching refs:Encoder
17 // Encoder configures encoding PNG images.
18 type Encoder struct {
35 type EncoderBuffer encoder
37 type encoder struct {
38 enc *Encoder
102 func (e *encoder) writeChunk(b []byte, name string) {
132 func (e *encoder) writeIHDR() {
166 func (e *encoder) writePLTEAndTRNS(p color.Palette) {
188 // An encoder is an io.Writer that satisfies writes by writing PNG IDAT chunks,
193 // No other code should treat an encoder as an io.Writer.
194 func (e *encoder) Write(b []byte) (int, error) {
302 func (e *encoder) writeImage(w io.Writer, m image.Image, cb int, level int) error {
486 func (e *encoder) writeIDATs() {
503 // Encoder.CompressionLevel to map to zlib.DefaultCompression.
519 func (e *encoder) writeIEND() { e.writeChunk(nil, "IEND") }
524 var e Encoder
529 func (enc *Encoder) Encode(w io.Writer, m image.Image) error {
538 var e *encoder
541 e = (*encoder)(buffer)
545 e = &encoder{}