var img Image =NewImage(d, 100, 40)
img是一个Image对象,如何把Image的图像内容转换成base64字符串,请大牛帮忙
var b bytes.Buffer
png.Encode(&b, img)
base64Str := "data:image/png;base64," + base64.StdEncoding.EncodeToString(b.Bytes())
#2
更多评论