mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-09-16 09:36:18 +02:00
dpr always enlarges smaller images
This commit is contained in:
@@ -73,12 +73,12 @@ func calcScale(width, height int, po *processingOptions, imgtype imageType) floa
|
||||
}
|
||||
}
|
||||
|
||||
scale = scale * po.Dpr
|
||||
|
||||
if !po.Enlarge && scale > 1 && imgtype != imageTypeSVG {
|
||||
return 1
|
||||
scale = 1
|
||||
}
|
||||
|
||||
scale = scale * po.Dpr
|
||||
|
||||
if srcW*scale < 1 {
|
||||
scale = 1 / srcW
|
||||
}
|
||||
|
Reference in New Issue
Block a user