Transpose instead of rotating image, to get rid of black borders

This commit is contained in:
Fierelier 2022-04-14 02:27:09 +02:00
parent c9e7ba4598
commit a75022195d

View File

@ -180,10 +180,10 @@ class queueWindow(QMainWindow):
bmp = PIL.Image.open(path)
if bmp.size[1] > bmp.size[0]:
if self.cPrinterSize[0] > self.cPrinterSize[1]:
bmp = bmp.rotate(90)
bmp = bmp.transpose(PIL.Image.ROTATE_90)
elif bmp.size[0] > bmp.size[1]:
if self.cPrinterSize[1] > self.cPrinterSize[0]:
bmp = bmp.rotate(90)
bmp = bmp.transpose(PIL.Image.ROTATE_90)
self.cDC.StartDoc(path)
self.cDC.StartPage()