def run(self): self._abort = False for __ in range(20): time.sleep(0.1) if self._abort: return pilImg = PILBackend.GetImage(self._picture) wxImg = wx.Image(PILBackend.ImageToStream(pilImg), wx.BITMAP_TYPE_JPEG) if not self._abort: self._callbackOnDone(wxImg)
def Run(self, jobContext): return PILBackend.GetImage(self.picture)