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:
parent
dc64087920
commit
13f16dda48
2 changed files with 2 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue