1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00

dpr always enlarges smaller images

This commit is contained in:
DarthSim 2019-06-26 14:37:08 +06:00
parent 327429a1e5
commit 435e5d4063

View File

@ -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
}