MCPcopy
hub / github.com/h2non/bimg / Enlarge

Method Enlarge

image.go:72–79  ·  view source on GitHub ↗

Enlarge enlarges the image by width and height. Aspect ratio is maintained.

(width, height int)

Source from the content-addressed store, hash-verified

70
71// Enlarge enlarges the image by width and height. Aspect ratio is maintained.
72func (i *Image) Enlarge(width, height int) ([]byte, error) {
73 options := Options{
74 Width: width,
75 Height: height,
76 Enlarge: true,
77 }
78 return i.Process(options)
79}
80
81// EnlargeAndCrop enlarges the image by width and height with additional crop transformation.
82func (i *Image) EnlargeAndCrop(width, height int) ([]byte, error) {

Callers 1

TestImageEnlargeFunction · 0.80

Calls 1

ProcessMethod · 0.95

Tested by 1

TestImageEnlargeFunction · 0.64