Skip to content

Commit

Permalink
Use gif output destination relative to the output destintation
Browse files Browse the repository at this point in the history
  • Loading branch information
esimov committed Jan 21, 2019
1 parent 0e7ec86 commit 00e727e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
_ "image/png"
"log"
"os"
"path"
"path/filepath"
"time"

Expand Down Expand Up @@ -57,7 +58,9 @@ func main() {
}()
}
fmt.Printf("encoding GIF\n")
if err := encodeGIF(imgs, "output.gif"); err != nil {

dest := path.Dir(*destination) + "/" + "output.gif"
if err := encodeGIF(imgs, dest); err != nil {
log.Fatal(err)
}
} else {
Expand Down

0 comments on commit 00e727e

Please sign in to comment.