MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / encodePNG

Function encodePNG

internal/attachments/processor_test.go:38–45  ·  view source on GitHub ↗
(t *testing.T, img image.Image)

Source from the content-addressed store, hash-verified

36}
37
38func encodePNG(t *testing.T, img image.Image) []byte {
39 t.Helper()
40 var buf bytes.Buffer
41 if err := png.Encode(&buf, img); err != nil {
42 t.Fatalf("encode test PNG: %v", err)
43 }
44 return buf.Bytes()
45}
46
47func encodeJPEG(t *testing.T, img image.Image) []byte {
48 t.Helper()

Calls 1

EncodeMethod · 0.65

Tested by

no test coverage detected