<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # package jpeg `import "image/jpeg"` jpeg包實現了jpeg格式圖像的編解碼。JPEG格式參見[http://www.w3.org/Graphics/JPEG/itu-t81.pdf](http://www.w3.org/Graphics/JPEG/itu-t81.pdf) ## Index * [Constants](#pkg-constants) * [type Reader](#Reader) * [type FormatError](#FormatError) * [func (e FormatError) Error() string](#FormatError.Error) * [type UnsupportedError](#UnsupportedError) * [func (e UnsupportedError) Error() string](#UnsupportedError.Error) * [type Options](#Options) * [func Decode(r io.Reader) (image.Image, error)](#Decode) * [func DecodeConfig(r io.Reader) (image.Config, error)](#DecodeConfig) * [func Encode(w io.Writer, m image.Image, o \*Options) error](#Encode) ## Constants ``` const DefaultQuality = 75 ``` DefaultQuality是默認的編碼質量參數。 ## type [Reader](https://github.com/golang/go/blob/master/src/image/jpeg/reader.go#L88 "View Source") ``` type Reader interface { io.Reader ReadByte() (c byte, err error) } ``` 如果提供的io.Reader接口沒有ReadByte方法,Decode函數會為該接口附加一個緩沖。 ## type [FormatError](https://github.com/golang/go/blob/master/src/image/jpeg/reader.go#L21 "View Source") ``` type FormatError string ``` 當輸入流不是合法的jpeg格式圖像時,就會返回FormatError類型的錯誤。 ### func (FormatError) [Error](https://github.com/golang/go/blob/master/src/image/jpeg/reader.go#L23 "View Source") ``` func (e FormatError) Error() string ``` ## type [UnsupportedError](https://github.com/golang/go/blob/master/src/image/jpeg/reader.go#L26 "View Source") ``` type UnsupportedError string ``` 當輸入流使用了合法但尚不支持的jpeg特性的時候,就會返回UnsupportedError類型的錯誤。 ### func (UnsupportedError) [Error](https://github.com/golang/go/blob/master/src/image/jpeg/reader.go#L28 "View Source") ``` func (e UnsupportedError) Error() string ``` ## type [Options](https://github.com/golang/go/blob/master/src/image/jpeg/writer.go#L488 "View Source") ``` type Options struct { Quality int } ``` Options是編碼質量參數。取值范圍[1,100],越大圖像編碼質量越高。 ## func [Decode](https://github.com/golang/go/blob/master/src/image/jpeg/reader.go#L346 "View Source") ``` func Decode(r io.Reader) (image.Image, error) ``` 從r讀取一幅jpeg格式的圖像并解碼返回該圖像。 ## func [DecodeConfig](https://github.com/golang/go/blob/master/src/image/jpeg/reader.go#L353 "View Source") ``` func DecodeConfig(r io.Reader) (image.Config, error) ``` 返回JPEG圖像的色彩模型和尺寸;函數不會解碼整個圖像。 ## func [Encode](https://github.com/golang/go/blob/master/src/image/jpeg/writer.go#L494 "View Source") ``` func Encode(w io.Writer, m image.Image, o *Options) error ``` Encode函數將采用JPEG 4:2:0基線格式和指定的編碼質量將圖像寫入w。如果o為nil將使用DefaultQuality。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看