mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 12:12:40 +02:00
16 lines
276 B
Go
16 lines
276 B
Go
package processing
|
|
|
|
func (p *Processor) scale(c *Context) error {
|
|
if c.WScale == 1 && c.HScale == 1 {
|
|
return nil
|
|
}
|
|
|
|
wscale, hscale := c.WScale, c.HScale
|
|
|
|
if (c.Angle+c.PO.Rotate())%180 == 90 {
|
|
wscale, hscale = hscale, wscale
|
|
}
|
|
|
|
return c.Img.Resize(wscale, hscale)
|
|
}
|