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:
parent
b2fc96f8e4
commit
75dcf36242
1 changed files with 4 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue