| 103 | self.files.append(x) |
| 104 | |
| 105 | def createThumbnails(self): |
| 106 | # Create thumbnails |
| 107 | self.tnDir = "thumbnails" |
| 108 | os.mkdir(self.tnDir) |
| 109 | for x in os.listdir(self.dirName): |
| 110 | os.chdir(self.dirName) |
| 111 | if(os.path.isfile(x)): |
| 112 | image_size = Image.open(x).size |
| 113 | width = int(image_size[0] * self.scale1) |
| 114 | height = int(image_size[1] * self.scale1) |
| 115 | img = Image.open(x) |
| 116 | img2 = img.resize([width,height],2) |
| 117 | os.chdir(self.tnDir) |
| 118 | img2.save(x) |
| 119 | |
| 120 | def createImages(self): |
| 121 | # Create images for display in the files |