def save(self, path, nbits=8):
''' Write the image to a png, jpg, tiff, etc.
Args:
path (`string`): path to write the image to.
nbits (`int`): number of bits in the output image.
Returns:
null: no return
'''
dat = (self.data * 255).astype(np.uint8)
if self.synthetic is False:
# was a real image, need to flip vertically.
dat = np.flip(dat, axis=0)
imsave(path, dat)
评论列表
文章目录