MCPcopy Create free account
hub / github.com/ericls/imgdd / makePNGBytes

Function makePNGBytes

httpserver/image_handlers_test.go:47–52  ·  view source on GitHub ↗
(w, h int)

Source from the content-addressed store, hash-verified

45}
46
47func makePNGBytes(w, h int) []byte {
48 img := image.NewRGBA(image.Rect(0, 0, w, h))
49 var buf bytes.Buffer
50 png.Encode(&buf, img)
51 return buf.Bytes()
52}
53
54func makeMultipartRequest(t *testing.T, fieldName, filename string, content []byte) *http.Request {
55 t.Helper()

Calls 1

BytesMethod · 0.80

Tested by

no test coverage detected