jpeg
少于1分钟
jpeg
https://pkg.go.dev/image/jpeg@go1.20.1
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.
常量
|
|
DefaultQuality is the default quality encoding parameter.
变量
This section is empty.
函数
func Decode
|
|
Decode reads a JPEG image from r and returns it as an image.Image.
func DecodeConfig
|
|
DecodeConfig returns the color model and dimensions of a JPEG image without decoding the entire image.
func Encode
|
|
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.
类型
type FormatError
|
|
A FormatError reports that the input is not a valid JPEG.
(FormatError) Error
|
|
type Options
|
|
Options are the encoding parameters. Quality ranges from 1 to 100 inclusive, higher is better.
type Reader <- DEPRECATED
type UnsupportedError
|
|
An UnsupportedError reports that the input uses a valid but unimplemented JPEG feature.
(UnsupportedError) Error
|
|