From a75022195deeb4bd986c29468b7f4ccdc4734db5 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Thu, 14 Apr 2022 02:27:09 +0200 Subject: [PATCH] Transpose instead of rotating image, to get rid of black borders --- batchprint.pyw | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/batchprint.pyw b/batchprint.pyw index 9e38f0c..39fc2b4 100644 --- a/batchprint.pyw +++ b/batchprint.pyw @@ -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()