3 ms·
If you'd like to output to an arbitrary writer, you can use the Image method. https://godoc.org/github.com/mmcloughlin/globe#Globe.Image https://godoc.org/gith
by mmcloughlin 9y ago
If you'd like to output to an arbitrary writer, you can use the Image method.
https://godoc.org/github.com/mmcloughlin/globe#Globe.Image https://godoc.org/github.com/mmcloughlin/globe#Globe.Image
This can be passed to an image encoder like
https://golang.org/pkg/image/png/#Encode https://golang.org/pkg/image/png/#Encode
https://golang.org/pkg/image/gif/#Encode https://golang.org/pkg/image/gif/#Encode
https://golang.org/pkg/image/jpeg/#Encode https://golang.org/pkg/image/jpeg/#Encode
These functions take io.Writer objects. SavePNG was provided for convenience.