Procházet zdrojové kódy

Fix image fitter scaling images to 1 pixel too small

This previously worked in v4. Some logic has changed, so we may need to
revise how different pixel calculations are done over all of the
plugins.
cinaeco před 3 roky
rodič
revize
abef6f0b3b
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      image_fitter_docker/image_fitter_docker.py

+ 2 - 2
image_fitter_docker/image_fitter_docker.py

@@ -112,8 +112,8 @@ class ImageFitter(DockWidget):
         # Repeated scaling does weird things to images.
         if self.scalingCheck.isChecked():
             doScaling = False
-            targetWidth = tbds['right'] - 1 - tbds['left']
-            targetHeight = tbds['bottom'] - 1 - tbds['top']
+            targetWidth = tbds['right'] - tbds['left']
+            targetHeight = tbds['bottom'] - tbds['top']
             layerWidth = bds.right() - bds.left()
             layerHeight = bds.bottom() - bds.top()
             # Deal with aspect ratio. Simply adjust target dimensions.