This repository was archived by the owner on Apr 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929WindowTemplate , TemplateBaseClass = pg .Qt .loadUiType (uiFile )
3030
3131def updateDelay (scale , time ):
32+ """ Hack fix for scalebar inaccuracy """
3233 QtCore .QTimer .singleShot (time , scale .updateBar )
3334
3435class MainWindow (TemplateBaseClass ):
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def load_image(self):
6262 try :
6363 file = QtWidgets .QFileDialog .getOpenFileName (self , 'Open file' , os .getcwd ())
6464 self .original_image = Image .open (file [0 ])
65- self .original_image = self .original_image .rotate (- 90 , expand = True )
65+ self .original_image = self .original_image .rotate (- 90 , expand = True ) #correct image orientation
6666 self .resize_to_scaling_factor (self .original_image )
6767 except Exception as err :
6868 print (format (err ))
@@ -76,7 +76,7 @@ def resize_to_scaling_factor(self, image):
7676 image = image .resize ((round (image .size [0 ]* self .scaling_factor ), round (image .size [1 ]* self .scaling_factor )))
7777 if self .ui .greyscale_checkBox .isChecked ():
7878 image = image .convert ("L" ) #convert to greyscale
79- image_array = np .array (image ) #correct numpy array auto-flip
79+ image_array = np .array (image )
8080
8181 width = image_array .shape [0 ]
8282 height = image_array .shape [1 ]
You can’t perform that action at this time.
0 commit comments