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

Method Decode

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

Decode reads bytes from r and returns the decoded image plus the detected format ("png", "jpeg", "gif", "bmp", "tiff", …). The returned format is the canonical lowercase name; callers can pass it back to Encode unchanged. If r holds bytes that this backend can't decode, the error wraps ErrUnsupporte

(r io.Reader)

Source from the content-addressed store, hash-verified

33 // it back to Encode unchanged. If r holds bytes that this backend
34 // can't decode, the error wraps ErrUnsupportedFormat.
35 Decode(r io.Reader) (img image.Image, format string, err error)
36
37 // Resize returns a new image with the longer edge fitted to maxLong,
38 // preserving aspect ratio. Images already within maxLong are

Implementers 1

pureGoProcessorinternal/attachments/processor_purego.

Calls

no outgoing calls