Пример #1
0
 def __init__(self,image_name,version):
     self.version = version
     self.response = Response()
     self.response.setNextStep("")
     self.response.setVersion(version)
     self.response.setID("preview")
     self.preview_name = image_name
     color_id = image_name.split("_")[1]
     image_name = image_name.split("_")[0]
     im = Image.open(OUPUT_DIR+image_name+".jpg").convert("L").resize((1000,1000),Image.BICUBIC)
     self.numpy_im = np.asarray(im)
     self.color_deltas = np.diff(settings.colors(version),axis=0)
     cid = int(color_id)
     self.preview(settings.levels(version)[cid])
Пример #2
0
 def genPresets(self):
     for l in settings.levels(self.version):
         self.preview(l)