<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 gif `import "image/gif"` gif包實現了gif文件的編碼器和解碼器。gif格式參見:[http://www.w3.org/Graphics/GIF/spec-gif89a.txt](http://www.w3.org/Graphics/GIF/spec-gif89a.txt) ## Index * [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) * [type GIF](#GIF) * [func DecodeAll(r io.Reader) (\*GIF, error)](#DecodeAll) * [func EncodeAll(w io.Writer, g \*GIF) error](#EncodeAll) ## type [Options](https://github.com/golang/go/blob/master/src/image/gif/writer.go#L246 "View Source") ``` type Options struct { // NumColors是圖像中的最多顏色數,范圍[1, 256] NumColors int // Quantizer用于生成NumColors大小的調色板,為nil時默認使用palette.Plan9 Quantizer draw.Quantizer // Drawer用于將圖像寫入期望的調色板格式的圖像,為nil時會使用draw.FloydSteinberg Drawer draw.Drawer } ``` Options是編碼參數。 ## func [Decode](https://github.com/golang/go/blob/master/src/image/gif/reader.go#L414 "View Source") ``` func Decode(r io.Reader) (image.Image, error) ``` 從文件流解碼并返回GIF文件中的第一幅圖像。 ## func [DecodeConfig](https://github.com/golang/go/blob/master/src/image/gif/reader.go#L446 "View Source") ``` func DecodeConfig(r io.Reader) (image.Config, error) ``` 返回GIF圖像的色彩模型和尺寸;函數不會解碼整個圖像文件。 ## func [Encode](https://github.com/golang/go/blob/master/src/image/gif/writer.go#L291 "View Source") ``` func Encode(w io.Writer, m image.Image, o *Options) error ``` 函數將圖像以GIF格式寫入w中。 ## type [GIF](https://github.com/golang/go/blob/master/src/image/gif/reader.go#L423 "View Source") ``` type GIF struct { Image []*image.Paletted // 連續的圖像 Delay []int // 每一幀延遲時間,單位是0.01s LoopCount int // 總的循環時間 } ``` GIF類型代表可能保存在GIF文件里的多幅圖像。 ### func [DecodeAll](https://github.com/golang/go/blob/master/src/image/gif/reader.go#L431 "View Source") ``` func DecodeAll(r io.Reader) (*GIF, error) ``` 函數從r中讀取一個GIF格式文件;返回值中包含了連續的圖幀和時間信息。 ### func [EncodeAll](https://github.com/golang/go/blob/master/src/image/gif/writer.go#L262 "View Source") ``` func EncodeAll(w io.Writer, g *GIF) error ``` 函數將g中所有的圖像按指定的每幀延遲和累計循環時間寫入w中。
                  <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>

                              哎呀哎呀视频在线观看