From 13f16dda488050840894f510135c542ce4e4d947 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Sun, 27 Apr 2014 11:05:18 -0400 Subject: [PATCH] generate gif in increasing order --- README.md | 2 +- example/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 71a3c54..cfdfe30 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/example/main.go b/example/main.go index 6e7f77a..29a66e3 100644 --- a/example/main.go +++ b/example/main.go @@ -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)