1
0
Fork 0
mirror of https://github.com/imjasonh/go-marvel synced 2026-07-18 23:09:46 +00:00

generate gif in increasing order

This commit is contained in:
Jason Hall 2014-04-27 11:05:18 -04:00
parent dc64087920
commit 13f16dda48
2 changed files with 2 additions and 2 deletions

View file

@ -1,3 +1,3 @@
**go-marvel** is a [Go](https://golang.org) client library for the [Marvel REST API](https://developer.marvel.com/)
See [`example/main.go`](https://github.com/ImJasonH/go-marvel/blob/master/example/main.go), which downloads all issue covers of a series, by series ID (default is "Uncanny X-Men"), and constructs a GIF image of them in reverse order.
See [`example/main.go`](https://github.com/ImJasonH/go-marvel/blob/master/example/main.go), which downloads all issue covers of a series, by series ID (default is "Uncanny X-Men"), and constructs a GIF image of them in order.

View file

@ -99,7 +99,7 @@ func writeGIF(filename string, imgs []image.Image) error {
return err
}
g.Delay[i] = 0
g.Image[i] = gimg.Image[0]
g.Image[len(imgs)-i-1] = gimg.Image[0]
}
return gif.EncodeAll(f, &g)