Python PIL.Image 模块,VERSION 实例源码

我们从Python开源项目中,提取了以下17个代码示例,用于说明如何使用PIL.Image.VERSION

项目:sdining    作者:Lurance    | 项目源码 | 文件源码
def pillow_required():
    def pil_version(version):
        try:
            return int(re.compile('[^\d]').sub('', version))
        except:
            return 116

    try:
        from PIL import Image, ImageDraw, ImageFont
    except ImportError:
        try:
            import Image
            import ImageDraw  # NOQA
            import ImageFont  # NOQA
        except ImportError:
            return True

    return pil_version(Image.VERSION) < 116
项目:cetusshop    作者:icetusorg    | 项目源码 | 文件源码
def pillow_required():
    def pil_version(version):
        try:
            return int(re.compile('[^\d]').sub('', version))
        except:
            return 116

    try:
        from PIL import Image, ImageDraw, ImageFont
    except ImportError:
        try:
            import Image
            import ImageDraw  # NOQA
            import ImageFont  # NOQA
        except ImportError:
            return True

    return pil_version(Image.VERSION) < 116
项目:nml-andythenorth    作者:andythenorth    | 项目源码 | 文件源码
def get_lib_versions():
    versions = {}
    #PIL
    try:
        from PIL import Image
        versions["PIL"] = Image.VERSION
    except ImportError:
        try:
            import Image
            versions["PIL"] = Image.VERSION
        except ImportError:
            versions["PIL"] = "Not found!"

    #PLY
    try:
        from ply import lex
        versions["PLY"] = lex.__version__
    except ImportError:
        versions["PLY"] = "Not found!"

    return versions
项目:imagepaste    作者:robinchenyu    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:Projects    作者:it2school    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:workflows.kyoyue    作者:wizyoung    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:ascii-art-py    作者:blinglnav    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:radar    作者:amoose136    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:sdining    作者:Lurance    | 项目源码 | 文件源码
def get_version(svn=False):
    "Return the version as a human-format string."
    return '.'.join([str(i) for i in VERSION])
项目:cetusshop    作者:icetusorg    | 项目源码 | 文件源码
def get_version(svn=False):
    "Returns the version as a human-format string."
    return '.'.join([str(i) for i in VERSION])
项目:WXBotForPi    作者:nemoTyrant    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:aws_lambda_backup_s3    作者:ogckw    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:teleport    作者:eomsoft    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:teleport    作者:eomsoft    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:face_rekognition    作者:cnidus    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:alfred-image-utilities    作者:danielecook    | 项目源码 | 文件源码
def versions():
    """
    (pyCMS) Fetches versions.
    """

    return (
        VERSION, core.littlecms_version,
        sys.version.split()[0], Image.VERSION
    )

# --------------------------------------------------------------------
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def OnAbout(self,e):
        description =\
        """Bonsu is a collection of tools and algorithms primarily for the reconstruction of phase information from diffraction intensity measurements."""
        licence =\
        """This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>."""
        if IsNotWX4():
            info = wx.AboutDialogInfo()
        else:
            info = wx.adv.AboutDialogInfo()
        info.SetIcon(wx.Icon(os.path.join(os.path.dirname(os.path.dirname(__file__)),'image',  'bonsu.ico'), wx.BITMAP_TYPE_ICO))
        info.SetName('Bonsu')
        info.SetVersion(__version__)
        info.SetDescription(description)
        info.SetCopyright('Copyright (C) 2011-2017 Marcus C. Newton')
        info.SetWebSite('github.com/bonsudev/bonsu')
        info.SetLicence(licence)
        info.AddDeveloper('Marcus C. Newton')
        self.version_str_list = []
        self.version_str_list.append("Python "+str(sys.version_info.major)+"."+str(sys.version_info.minor)+"."+str(sys.version_info.micro))
        self.version_str_list.append("wxPython "+wx.version())
        self.version_str_list.append("NumPy "+numpy.version.version)
        self.version_str_list.append("VTK "+vtk.vtkVersion().GetVTKVersion())
        self.version_str_list.append("PIL "+Image.VERSION)
        try:
            import h5py
            self.version_str_list.append("h5Py "+h5py.version.version)
        except:
            pass
        self.version_str_list.append("Build date: "+__builddate__)
        info.SetArtists(self.version_str_list)
        dialog = CustomAboutDialog(self,info)
        dialog.ShowModal()
        dialog.Destroy()