def saveit(self):
doit = tkMessageBox.askyesno("save gamma curve", "overwrite?")
if doit:
keys = [ [self.gamma_red[x][0], (self.gamma_red[x][1], self.gamma_green[x][1], self.gamma_blue[x][1])] for x in range(self.num_ctrl)]
grad = { 'gamma':keys}
with open('gamma_grad.json', 'w') as outfile:
json.dump(grad, outfile)
print 'written.'
评论列表
文章目录