1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-08 10:45:04 +02:00
imgproxy/processing/result_size.go

14 lines
356 B
Go

package processing
import (
"github.com/imgproxy/imgproxy/v3/imath"
"github.com/imgproxy/imgproxy/v3/options"
)
func resultSize(po *options.ProcessingOptions, dprScale float64) (int, int) {
resultWidth := imath.Scale(po.Width, dprScale*po.ZoomWidth)
resultHeight := imath.Scale(po.Height, dprScale*po.ZoomHeight)
return resultWidth, resultHeight
}