| 118 | img2.save(x) |
| 119 | |
| 120 | def createImages(self): |
| 121 | # Create images for display in the files |
| 122 | os.chdir(self.dirName) |
| 123 | self.imagesDir = "images" |
| 124 | os.mkdir(self.imagesDir) |
| 125 | for x in os.listdir(self.dirName): |
| 126 | os.chdir(self.dirName) |
| 127 | if(os.path.isfile(x)): |
| 128 | image_size = Image.open(x).size |
| 129 | width = int(image_size[0] * self.scale2) |
| 130 | height = int(image_size[1] * self.scale2) |
| 131 | img = Image.open(x) |
| 132 | img2 = img.resize([width,height],2) |
| 133 | os.chdir(self.imagesDir) |
| 134 | img2.save(x) |
| 135 | |
| 136 | def createCSS(self): |
| 137 | # Create CSS file |