1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00
imgproxy/processing/result_size.go
2022-01-18 16:16:14 +06:00

14 lines
334 B
Go

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
}