MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / extendAspectRatio

Method extendAspectRatio

processing/extend.go:32–44  ·  view source on GitHub ↗
(c *Context)

Source from the content-addressed store, hash-verified

30}
31
32func (p *Processor) extendAspectRatio(c *Context) error {
33 if !c.PO.ExtendAspectRatioEnabled() {
34 return nil
35 }
36
37 width, height := c.ExtendAspectRatioWidth, c.ExtendAspectRatioHeight
38 if width == 0 || height == 0 {
39 return nil
40 }
41
42 gravity := c.PO.ExtendAspectRatioGravity()
43 return extendImage(c, width, height, &gravity)
44}

Callers

nothing calls this directly

Calls 3

extendImageFunction · 0.85

Tested by

no test coverage detected