Logo Search packages:      
Sourcecode: zope-cpsskins version File versions  Download package

def CPSSkins::PortalTheme::PortalTheme::_createThumbnail (   self,
  file = None 
) [private]

Create a thumbnail image.

Definition at line 1302 of file PortalTheme.py.

01302                                          :
        """Create a thumbnail image.
        """
        if file is None:
            return None
        width, height = THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT
        if isPILAvailable:
            try:
                img = PIL.Image.open(file)
            except IOError:
                pass
            else:
                image = img.resize((width, height), PIL.Image.ANTIALIAS)
                file.seek(0)
                image.save(file, THUMBNAIL_IMAGE_FORMAT)
        return file

InitializeClass(PortalTheme)

def addPortalTheme(dispatcher, id, REQUEST=None, **kw):


Generated by  Doxygen 1.6.0   Back to index