(self, webpage, images, names, image_path, title='')
| 172 | |
| 173 | # save image to the disk |
| 174 | def save_images(self, webpage, images, names, image_path, title=''): |
| 175 | image_dir = webpage.get_image_dir() |
| 176 | # short_path = ntpath.basename(image_path) |
| 177 | # name = os.path.splitext(short_path)[0] |
| 178 | # name = short_path |
| 179 | # webpage.add_header('%s, %s' % (name, title)) |
| 180 | ims = [] |
| 181 | txts = [] |
| 182 | links = [] |
| 183 | |
| 184 | for label, image_numpy in zip(names, images): |
| 185 | image_name = '%s.jpg' % (label,) |
| 186 | save_path = os.path.join(image_dir, image_name) |
| 187 | util.save_image(image_numpy, save_path) |
| 188 | |
| 189 | ims.append(image_name) |
| 190 | txts.append(label) |
| 191 | links.append(image_name) |
| 192 | webpage.add_images(ims, txts, links, width=self.win_size) |
| 193 | |
| 194 | # save image to the disk |
| 195 | # def save_images(self, webpage, visuals, image_path, short=False): |
nothing calls this directly
no test coverage detected