Closed hlalibe closed 6 years ago
I'm trying this and it works, don't know if it's the best way though:
import (
"io/ioutil"
)
bytes, err := ioutil.ReadFile("/media/test.png")
display.PNG(bytes)
Compact and readable, I'd say it's a good way
Saw the code to display an image from an URL: https://github.com/gopherdata/gophernotes/blob/master/examples/Display.ipynb
Works nicely. How can I reuse this code to display an image from my local drive ? I tried :
But I get:
type os.File has no field or method "Body": resp.Body