// TestUnknownDisposal loads an animated GIF and checks that it combines when
// the disposal method is unknown.
TestUnknownDisposal loads an animated GIF and checks that it combines when
the disposal method is unknown.
// TestUnknownDisposal loads an animated GIF and checks that it combines when // the disposal method is unknown .
func TestUnknownDisposal(t *testing.T) {
	f, err := os.Open(getResource("spinning-2x2.gif"))
	if err != nil {
		panic(err)
	}
	defer f.Close()
	g, err := gif.DecodeAll(f)
	if err != nil {
		panic(err)
	}
	g.Disposal[0] = 0xFF 
	gifHelper, err := NewHelper(g)
	if err != nil {
		t.Fatalf(`err = %v, want nil`, err)
	}
	frame1WantColors := [][]color.Color{
		{color.Black, color.White},
		{color.White, color.White},
	}
	for y, row := range frame1WantColors {
		for x, c := range row {
			r, g, b, a := gifHelper.Frames[1].At(x, y).RGBA()
			wr, wg, wb, wa := c.RGBA()
			if r != wr || g != wg || b != wb || a != wa {
				t.Errorf(
					`Frame 1 @ (%d, %d): RGBA = %v %v %v %v, want %v %v %v %v`,
					x, y,
					r, g, b, a,
					wr, wg, wb, wa,
				)
			}
		}
	}
}
func TestUnknownDisposal ( t * testing . T ) { f , err := os . Open ( getResource ( " " ) ) if err != nil { panic ( err ) } defer f . Close ( ) g , err := gif . DecodeAll ( f ) if err != nil { panic ( err ) } g . Disposal [ 0 ] = 0xFF gifHelper , err := NewHelper ( g ) if err != nil { t . Fatalf ( `err = %v, want nil` , err ) } frame1WantColors := [ ] [ ] color . Color { { color . Black , color . White } , { color . White , color . White } , } for y , row := range frame1WantColors { for x , c := range row { r , g , b , a := gifHelper . Frames [ 1 ] . At ( x , y ) . RGBA ( ) wr , wg , wb , wa := c . RGBA ( ) if r != wr || g != wg || b != wb || a != wa { t . Errorf ( `Frame 1 @ (%d, %d): RGBA = %v %v %v %v, want %v %v %v %v` , x , y , r , g , b , a , wr , wg , wb , wa , ) } } } }
TestUnknownDisposal loads an animated GIF and checks that it combines when
the disposal method is unknown.
TestUnknownDisposal loads an animated GIF and checks that it combines when the disposal method is unknown .
// NOTE Unknown disposal