From 7b9ef410c1dbb8f9688fd24600872a17f31362a2 Mon Sep 17 00:00:00 2001 From: danamir Date: Mon, 10 Dec 2018 00:04:15 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BB=D0=B0=D0=B4=D0=BE=D1=87=D0=BD=D1=8B=D0=B5=20?= =?UTF-8?q?=D1=84=D0=B0=D0=B9=D0=BB=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- learn/image2.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 learn/image2.py diff --git a/learn/image2.py b/learn/image2.py deleted file mode 100644 index 5aff598..0000000 --- a/learn/image2.py +++ /dev/null @@ -1,23 +0,0 @@ -import wx - -def scale_bitmap(bitmap): - dw, dh = wx.DisplaySize() - image = bitmap.ConvertToImage() - image = image.Scale(dw, dh, wx.IMAGE_QUALITY_HIGH) - result = wx.BitmapFromImage(image) - return result - -class Panel(wx.Panel): - def __init__(self, parent, path): - super(Panel, self).__init__(parent, -1) - bitmap = wx.Bitmap(path) - bitmap = scale_bitmap(bitmap) - control = wx.StaticBitmap(self, -1, bitmap) - control.SetPosition((0, 0)) - -if __name__ == '__main__': - app = wx.App() - frame = wx.Frame(None, -1, 'Scaled Image') - panel = Panel(frame, 'input.jpg') - frame.Show() - app.MainLoop()