Browse Source

dpr always enlarges smaller images

DarthSim 6 years ago
parent
commit
435e5d4063
1 changed files with 3 additions and 3 deletions
  1. 3 3
      process.go

+ 3 - 3
process.go

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