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:
parent
327429a1e5
commit
435e5d4063
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user