def validate_photo(self,path):
import wx
img = wx.Image(path, wx.BITMAP_TYPE_ANY)
# scale the image, preserving the aspect ratio
W=img.GetWidth()
H=img.GetHeight()
if W>120 or H>120 or W<100 or H<100:
return False," Image Height and Width must be between 100-120 pixels"
return [True]
评论列表
文章目录