def _confirm(self): if not self._check_file_open(0): return if not self._check_file_save(1): return if not self._check_file_save(2): return result = Jpt.split(self.entries[0].get(), self.entries[1].get(), self.entries[2].get()) tkMessageBox.showinfo(self.title, result)
def _confirm(self): if not self._check_file_save(0): return if not self._check_file_open(1): return jpt = self.entries[0].get() custom = self.entries[1].get() quality = 95 try: quality = int(self.entries[2].get()) except: self.entries[2].delete(0, END) self.entries[2].insert(0, "95") jpeg = custom + "__tmp__.jpg" png = custom + "__tmp__.png" PilConv.convert(custom, jpeg, png, quality) result = Jpt.merge(jpt, jpeg, png) os.remove(jpeg) os.remove(png) tkMessageBox.showinfo(self.title, result)
def split(args): print Jpt.split(args[0], args[1], args[2])
def merge(args): print Jpt.merge(args[0], args[1], args[2])