- def Queue (self, uris, mimes, handle):
- for i in range (0, len(uris)):
- uri = uris[i]
- fullCoverFileName = uri[7:]
- if (os.path.exists (fullCoverFileName)):
- thumbFile = get_thumb_filename_for_path (fullCoverFileName)
- try:
- image = Image.open (fullCoverFileName)
- image = image.resize (self.THUMBNAIL_SIZE, Image.ANTIALIAS )
- image.save( thumbFile, "JPEG" )
- print "Thumbnail: " + thumbFile
- except IOError, e:
- print e
- return False
+ def create (self, fullCoverFileName, thumbFile):
+ if (os.path.exists (fullCoverFileName)):
+ try:
+ image = Image.open (fullCoverFileName)
+ image = image.resize (self.THUMBNAIL_SIZE, Image.ANTIALIAS )
+ image.save (thumbFile, "JPEG")
+ print "Thumbnail: " + thumbFile
+ except IOError, e:
+ print e
+ return False