validations.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:smartschool 作者: asifkodur 项目源码 文件源码
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]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号