package jpeg
Import Path
image/jpeg (on go.dev)
Dependency Relation
imports 6 packages, and imported by 0 packages
Involved Source Files
fdct.go
huffman.go
idct.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)
*internal/zstd.Reader
*strings.Reader
Reader : compress/flate.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.7.0-preview. (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. |