Skip to content

Instantly share code, notes, and snippets.

@benjojo
Last active July 16, 2017 15:19
Show Gist options
  • Save benjojo/8dcc74441aabf9937ab2a065ca89b0e7 to your computer and use it in GitHub Desktop.
Save benjojo/8dcc74441aabf9937ab2a065ca89b0e7 to your computer and use it in GitHub Desktop.
CYBER GLOBE
package main
import (
"image/color"
"log"
"fmt"
"github.com/mmcloughlin/globe"
)
func main() {
log.Printf("boop")
for lat := 0; lat < 180; lat++ {
globe.DefaultStyle.Background = color.NRGBA{0x00, 0x00, 0x00, 255}
g := globe.New()
green := color.NRGBA{0x00, 0xFF, 0x00, 255}
g.DrawCountryBoundaries(globe.Color(green))
g.DrawGraticule(30)
g.CenterOn(51, (float64(lat)-180.0)*2)
g.SavePNG(fmt.Sprintf("%d.png", lat), 400)
}
}
#!/bin/sh
palette="/tmp/palette.png"
filters="fps=25"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -f image2 -i %d.png -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment