package jpeg
Import Path
image/jpeg (on go.dev)
Dependency Relation
imports 6 packages, and imported by one package
Involved Source Files
dct.go
huffman.go
Package jpeg implements a JPEG image decoder and encoder.
JPEG is defined in ITU-T T.81: https://www.w3.org/Graphics/JPEG/itu-t81.pdf.
scan.go
writer.go
Package-Level Type Names (total 4)
A FormatError reports that the input is not a valid JPEG.
( FormatError) Error() string
FormatError : error
Options are the encoding parameters.
Quality ranges from 1 to 100 inclusive, higher is better.
Quality int
func Encode(w io.Writer, m image.Image, o *Options) error
Deprecated: Reader is not used by the [image/jpeg] package and should
not be used by others. It is kept for compatibility.
( Reader) Read(p []byte) (n int, err error)
( Reader) ReadByte() (byte, error)
*bufio.Reader
bufio.ReadWriter
*bytes.Buffer
*bytes.Reader
compress/flate.Reader (interface)
*github.com/apache/thrift/lib/go/thrift.RichTransport
*github.com/apache/thrift/lib/go/thrift.StreamTransport
*github.com/apache/thrift/lib/go/thrift.TBufferedTransport
*github.com/apache/thrift/lib/go/thrift.TFramedTransport
*github.com/apache/thrift/lib/go/thrift.THttpClient
github.com/apache/thrift/lib/go/thrift.TMemoryBuffer
github.com/apache/thrift/lib/go/thrift.TRichTransport (interface)
*github.com/golang/snappy.Reader
*github.com/gookit/goutil/byteutil.Buffer
github.com/klauspost/compress/flate.Reader (interface)
*github.com/klauspost/compress/internal/snapref.Reader
*github.com/klauspost/compress/s2.Reader
github.com/klauspost/compress/s2.ReadSeeker
*github.com/libp2p/go-buffer-pool.Buffer
github.com/quic-go/quic-go/quicvarint.Reader (interface)
*google.golang.org/grpc/mem.Reader
google.golang.org/protobuf/encoding/protodelim.Reader (interface)
*internal/zstd.Reader
*strings.Reader
Reader : compress/flate.Reader
Reader : github.com/klauspost/compress/flate.Reader
Reader : github.com/quic-go/quic-go/quicvarint.Reader
Reader : google.golang.org/protobuf/encoding/protodelim.Reader
Reader : io.ByteReader
Reader : io.Reader
Package-Level Functions (total 3)
Decode reads a JPEG image from r and returns it as an [image.Image].
DecodeConfig returns the color model and dimensions of a JPEG image without
decoding the entire image.
Encode writes the Image m to w in JPEG 4:2:0 baseline format with the given
options. Default parameters are used if a nil *[Options] is passed.
Package-Level Constants (only one)
DefaultQuality is the default quality encoding parameter.
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |