a simple og image generator written in Go
(The Gopher on the base iamge was designed by Renée French.)
a simple example composed background image and text.
func main() {
g := ogpgen.NewRandomBackGround()
if err := g.AttachText(&ogpgen.TextCompositionParams{
Text: "Hello, World!",
}); err != nil {
panic(err)
}
if err := g.Save("output.jpg"); err != nil {
panic(err)
}
}
open ./output.jpg
The code for the more complex case of combining images and text, as shown in the overview, is available in /demo/baseimage_with_text