You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// When calling Encode instead of EncodeAll, the single-frame image is
// translated such that its top-left corner is (0, 0), so that the single
// frame completely fills the overall GIF's bounds.
This test of a round trip through DecodeAll/EncodeAll passes:
func TestRoundtrip(t *testing.T) {
data := []byte("GIF89a\n\x0000000,\x00\x000\x00\n\x00\n\x00\x80000000\x02\b\xf01u\xb9\xfdal\x05\x00;")
gif, err := DecodeAll(bytes.NewReader(data))
if err != nil {
t.Fatal(err)
}
var w bytes.Buffer
err = EncodeAll(&w, gif)
if err != nil {
t.Fatal(err)
}
gif1, err := DecodeAll(&w)
if err != nil {
t.Fatal(err)
}
if len(gif.Image) != len(gif1.Image) {
t.Fatal("wrong number of images")
}
The following program fails:
Bounds.Min should be preserved by Encode.
go version devel +b0532a9 Mon Jun 8 05:13:15 2015 +0000 linux/amd64
The text was updated successfully, but these errors were encountered: