Last active
July 16, 2017 15:19
-
-
Save benjojo/8dcc74441aabf9937ab2a065ca89b0e7 to your computer and use it in GitHub Desktop.
CYBER GLOBE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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