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

Method Resize

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

Resize returns a new image with the longer edge fitted to maxLong, preserving aspect ratio. Images already within maxLong are returned unchanged so callers don't pay the encode cost on pass-through. maxLong must be positive.

(img image.Image, maxLong int)

Source from the content-addressed store, hash-verified

39 // returned unchanged so callers don't pay the encode cost on
40 // pass-through. maxLong must be positive.
41 Resize(img image.Image, maxLong int) (image.Image, error)
42
43 // Rotate returns a new image rotated by deg degrees clockwise.
44 // Only multiples of 90 (90, 180, 270, plus their negatives) are

Implementers 1

pureGoProcessorinternal/attachments/processor_purego.

Calls

no outgoing calls