فهرست منبع

wxGUI/g.gui.psmap: fix preview orientation if page orientation is landscape (#1056)

Tomas Zigo 4 سال پیش
والد
کامیت
872b13879a
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      gui/wxpython/psmap/frame.py

+ 3 - 1
gui/wxpython/psmap/frame.py

@@ -433,7 +433,9 @@ class PsMapFrame(wx.Frame):
             try:
                 im = PILImage.open(event.userData['filename'])
                 if self.instruction[self.pageId]['Orientation'] == 'Landscape':
-                    im = im.rotate(270)
+                    import numpy as np
+                    im_array = np.array(im)
+                    im = PILImage.fromarray(np.rot90(im_array, 3))
 
                 # hack for Windows, change method for loading EPS
                 if sys.platform == 'win32':