result_size.go 334 B

12345678910111213
  1. package processing
  2. import (
  3. "github.com/imgproxy/imgproxy/v3/imath"
  4. "github.com/imgproxy/imgproxy/v3/options"
  5. )
  6. func resultSize(po *options.ProcessingOptions) (int, int) {
  7. resultWidth := imath.Scale(po.Width, po.Dpr*po.ZoomWidth)
  8. resultHeight := imath.Scale(po.Height, po.Dpr*po.ZoomHeight)
  9. return resultWidth, resultHeight
  10. }