1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-23 11:14:48 +02:00
imgproxy/processing/result_size.go

14 lines
334 B
Go
Raw Normal View History

2022-01-18 16:09:32 +06:00
package processing
import (
"github.com/imgproxy/imgproxy/v3/imath"
"github.com/imgproxy/imgproxy/v3/options"
)
func resultSize(po *options.ProcessingOptions) (int, int) {
resultWidth := imath.Scale(po.Width, po.Dpr*po.ZoomWidth)
resultHeight := imath.Scale(po.Height, po.Dpr*po.ZoomHeight)
return resultWidth, resultHeight
}