Created
November 8, 2020 06:45
-
-
Save romanitalian/e65471d5c5008666a746227900799b1c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"bytes" | |
"image" | |
"image/gif" | |
"net/http" | |
... | |
) | |
var buf bytes.Buffer | |
gif.Encode(&buf, image.Rect(0, 0, 16, 16), nil) | |
w.Header().Set("Content-Type", "image/jpeg") | |
w.Header().Set("Content-Length", strconv.Itoa(len(buf.Bytes()))) | |
w.Write(buf.Bytes()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment