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

Method Encode

internal/attachments/processor.go:62–62  ·  view source on GitHub ↗

Encode writes img to w in the given format ("png" / "jpeg"). JPEG is encoded at quality 85 — small enough for thumbnails, high enough that pixel-level lossy artifacts are rare on the kinds of content (screenshots, photos, diagrams) Pad sees most. Unknown formats wrap ErrUnsupportedFormat.

(img image.Image, format string, w io.Writer)

Source from the content-addressed store, hash-verified

60 // kinds of content (screenshots, photos, diagrams) Pad sees most.
61 // Unknown formats wrap ErrUnsupportedFormat.
62 Encode(img image.Image, format string, w io.Writer) error
63
64 // Capabilities reports what this backend can do. The editor reads
65 // these flags via GET /api/v1/server/capabilities and gates

Callers 15

encodePNGFunction · 0.65
encodeJPEGFunction · 0.65
encodeGIFFunction · 0.65
EncodeMethod · 0.65
TestSend_SuccessFunction · 0.65
TestSend_APIErrorFunction · 0.65
TestSend_SuccessFalseFunction · 0.65

Implementers 1

pureGoProcessorinternal/attachments/processor_purego.

Calls

no outgoing calls

Tested by 15

encodePNGFunction · 0.52
encodeJPEGFunction · 0.52
encodeGIFFunction · 0.52
TestSend_SuccessFunction · 0.52
TestSend_APIErrorFunction · 0.52
TestSend_SuccessFalseFunction · 0.52
TestSendWelcomeFunction · 0.52