1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-06-17 22:37:33 +02:00
Files
imgproxy/processing/result_size.go

14 lines
356 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, dprScale float64) (int, int) {
resultWidth := imath.Scale(po.Width, dprScale*po.ZoomWidth)
resultHeight := imath.Scale(po.Height, dprScale*po.ZoomHeight)
2022-01-18 16:09:32 +06:00
return resultWidth, resultHeight
}