mirror of
				https://github.com/imgproxy/imgproxy.git
				synced 2025-10-30 23:08:02 +02:00 
			
		
		
		
	DPR does not enlarge image unless enlarge is true
This commit is contained in:
		| @@ -67,6 +67,9 @@ func calcScale(width, height int, po *options.ProcessingOptions, imgtype imagety | ||||
| 		hshrink = srcH / dstH | ||||
| 	} | ||||
|  | ||||
| 	wshrink /= po.Dpr | ||||
| 	hshrink /= po.Dpr | ||||
|  | ||||
| 	if wshrink != 1 || hshrink != 1 { | ||||
| 		rt := po.ResizingType | ||||
|  | ||||
| @@ -120,9 +123,6 @@ func calcScale(width, height int, po *options.ProcessingOptions, imgtype imagety | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	wshrink /= po.Dpr | ||||
| 	hshrink /= po.Dpr | ||||
|  | ||||
| 	if wshrink > srcW { | ||||
| 		wshrink = srcW | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user