資源簡介
python課程的一個小作業,GUI圖形界面設計了一個小型的圖片處理程序,可以圖片載入、粘貼、模糊、旋轉、縮放、保存調整比例。提醒下,只要運行main_win.py文件,可能出現的問題就是包沒有,需要自己去pip下,若是您觀察的夠仔細的話還能找到wxformbuilder的下載地址!

代碼片段和文件信息
#?-*-?coding:?utf-8?-*-?
###########################################################################
##?Python?code?generated?with?wxFormBuilder?(version?Jun?17?2015)
##?http://www.wxformbuilder.org/
##
##?PLEASE?DO?“NOT“?EDIT?THIS?FILE!
###########################################################################
import?wx
import?wx.xrc
###########################################################################
##?Class?picture
###########################################################################
class?picture?(?wx.frame?):
def?__init__(?self?parent?):
wx.frame.__init__?(?self?parent?id?=?wx.ID_ANY?title?=?u“My?Picture?Editor“?pos?=?wx.DefaultPosition?size?=?wx.Size(?900600?)?style?=?wx.DEFAULT_frame_style|wx.TAB_TRAVERSAL?)
self.SetSizeHintsSz(?wx.DefaultSize?wx.DefaultSize?)
self.SetForegroundColour(?wx.SystemSettings.GetColour(?wx.SYS_COLOUR_INFOBK?)?)
gbSizer2?=?wx.GridBagSizer(?0?0?)
gbSizer2.SetFlexibleDirection(?wx.BOTH?)
gbSizer2.SetNonFlexibleGrowMode(?wx.FLEX_GROWMODE_SPECIFIED?)
self.xianshi?=?wx.StaticText(?self?wx.ID_ANY?u“交互對話框“?wx.DefaultPosition?wx.DefaultSize?0?)
self.xianshi.Wrap(?-1?)
gbSizer2.Add(?self.xianshi?wx.GBPosition(?13?1?)?wx.GBSpan(?1?1?)?wx.ALL?10?)
self.process?=?wx.Slider(?self?wx.ID_ANY?50?0?100?wx.DefaultPosition?wx.DefaultSize?wx.SL_HORIZONTAL?)
gbSizer2.Add(?self.process?wx.GBPosition(?13?14?)?wx.GBSpan(?1?1?)?wx.ALL?10?)
self.info?=?wx.TextCtrl(?self?wx.ID_ANY?wx.EmptyString?wx.DefaultPosition?wx.DefaultSize?0?)
gbSizer2.Add(?self.info?wx.GBPosition(?13?2?)?wx.GBSpan(?1?1?)?wx.ALL?5?)
self.bfb?=?wx.StaticText(?self?wx.ID_ANY?u“百分比(%):“?wx.DefaultPosition?wx.DefaultSize?0?)
self.bfb.Wrap(?-1?)
gbSizer2.Add(?self.bfb?wx.GBPosition(?13?10?)?wx.GBSpan(?1?1?)?wx.ALL?10?)
self.m_button23?=?wx.Button(?self?wx.ID_ANY?u“保存圖片“?wx.DefaultPosition?wx.DefaultSize?0?)
gbSizer2.Add(?self.m_button23?wx.GBPosition(?2?14?)?wx.GBSpan(?1?1?)?wx.ALL?10?)
self.m_button24?=?wx.Button(?self?wx.ID_ANY?u“旋轉圖片“?wx.DefaultPosition?wx.DefaultSize?0?)
gbSizer2.Add(?self.m_button24?wx.GBPosition(?3?14?)?wx.GBSpan(?1?1?)?wx.ALL?10?)
self.m_button25?=?wx.Button(?self?wx.ID_ANY?u“縮小圖片“?wx.DefaultPosition?wx.DefaultSize?0?)
gbSizer2.Add(?self.m_button25?wx.GBPosition(?4?14?)?wx.GBSpan(?1?1?)?wx.ALL?10?)
self.m_button26?=?wx.Button(?self?wx.ID_ANY?u“圖片裁剪“?wx.DefaultPosition?wx.DefaultSize?0?)
gbSizer2.Add(?self.m_button26?wx.GBPosition(?5?14?)?wx.GBSpan(?1?1?)?wx.ALL?10?)
self.m_button27?=?wx.Button(?self?wx.ID_ANY?u“圖片模糊“?wx.DefaultPosition?wx.DefaultSize?0?)
gbSizer2.Add(?self.m_button27?wx.GBPosition(?6?14?)?wx.GBSpan(?1?1?)?wx.ALL?10?)
self.m_button28?=?wx.Button(?self?wx.ID_ANY?u“圖片粘貼“?wx.DefaultPosition?wx.DefaultSize?0?)
gbSizer2.Add(?self.m_button28?wx.GBPosition
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4627??2018-06-03?12:36??Python課程設計\ba
?????文件??????34147??2018-06-03?13:48??Python課程設計\library.JPEG
?????文件???????2621??2018-06-03?15:24??Python課程設計\main_win.py
?????文件??????59963??2018-06-03?13:48??Python課程設計\river.jpg
?????文件??????28521??2018-06-02?21:04??Python課程設計\suke.jpg
?????文件??????74699??2018-06-03?16:01??Python課程設計\ui.fbp
?????文件???????4389??2018-06-03?12:36??Python課程設計\__pycache__\ba
?????文件??????48729??2018-06-03?15:30??Python課程設計\保存的圖片.jpg
?????文件????2999262??2018-06-21?10:43??Python課程設計\說明文檔.docx
?????目錄??????????0??2018-06-03?12:36??Python課程設計\__pycache__
?????目錄??????????0??2018-06-21?10:48??Python課程設計
-----------?---------??----------?-----??----
??????????????3256958????????????????????11
評論
共有 條評論