LEFT | RIGHT |
(Both sides are equal) |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Package gif implements a GIF image decoder. | 5 // Package gif implements a GIF image decoder. |
6 // | 6 // |
7 // The GIF specification is at http://www.w3.org/Graphics/GIF/spec-gif89a.txt. | 7 // The GIF specification is at http://www.w3.org/Graphics/GIF/spec-gif89a.txt. |
8 package gif | 8 package gif |
9 | 9 |
10 import ( | 10 import ( |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 var d decoder | 412 var d decoder |
413 if err := d.decode(r, true); err != nil { | 413 if err := d.decode(r, true); err != nil { |
414 return image.Config{}, err | 414 return image.Config{}, err |
415 } | 415 } |
416 return image.Config{d.globalColorMap, d.width, d.height}, nil | 416 return image.Config{d.globalColorMap, d.width, d.height}, nil |
417 } | 417 } |
418 | 418 |
419 func init() { | 419 func init() { |
420 image.RegisterFormat("gif", "GIF8?a", Decode, DecodeConfig) | 420 image.RegisterFormat("gif", "GIF8?a", Decode, DecodeConfig) |
421 } | 421 } |
LEFT | RIGHT |