ToBase64
Return a Base64 encoded string in PNG format for the image.

Parameters

None

Return Values

string

Examples

package main
​
import (
"github.com/fishtailstudio/imgo"
)
​
func main() {
base64Img := imgo.Load("gopher.png").ToBase64()
}
In the above example, the base64Imgstring is data:image/png;base64,......
Copy link
On this page
Parameters
Return Values
Examples