1
0
Fork 0
mirror of https://github.com/imjasonh/go-marvel synced 2026-07-13 08:27:56 +00:00

example: Get frames in order instead of reversing when writing the gif

This commit is contained in:
Jason Hall 2014-05-05 12:59:53 -04:00
parent b2fc96f8e4
commit 75dcf36242

View file

@ -35,8 +35,9 @@ func main() {
for {
r, err := c.SingleSeries(*seriesID).Comics(marvel.ComicsParams{
CommonParams: marvel.CommonParams{
Offset: offset,
Limit: limit,
Offset: offset,
Limit: limit,
OrderBy: "onsaleDate",
},
})
if err != nil {
@ -111,7 +112,7 @@ func writeGIF(filename string, imgs []image.Image) error {
return err
}
g.Delay[i] = 0
g.Image[len(imgs)-i-1] = gimg.Image[0]
g.Image[i] = gimg.Image[0]
}
return gif.EncodeAll(f, &g)