各应用 分别合成几张小图片生成图像文件,编码为 JPEG,并将 JPEG 数据作为 HTTP 响应发回客户端。...3、在背景图像上绘制各图像元素(使用 layoutMap 判断应绘制的位置。)
4、将图像编码为 JPEG
5、将 JPEG 直接写入 HTTP 响应写入器中,将图像返回给用户。...= nil {
w.Header().Set("Content-type", "image/jpeg")
jpeg.Encode(w, defaultImage, &imageQuality...draw.Draw(m, layoutMap[t], em[p], image.ZP, draw.Over)
}
// 编码为 JPEG 图像并写为响应。...w.Header().Set("Content-type", "image/jpeg")
w.Header().Set("Cache-control", "public, max-age=259200