Exemple #1
0
 def endSelection(self, widget):
     if not self.insertionThread.isRunning():
         self.insertionThread.srcImage = self.source
         self.insertionThread.options = self.options
         self.insertionThread.destImage = Image.from_qimage(self._imageCopy)
         self.insertionThread.destImage.scene_description = self._scene_description
         self.insertionThread.bbox = (self._topLeftPoint.x(), self._topLeftPoint.y(), self._bottomRightPoint.x(), self._bottomRightPoint.y())
         self.insertionThread.widget = widget
         self.insertionThread.start()
 def save(self, path):
     path = os.path.abspath(path)
     parent = os.path.dirname(path)
     if not os.path.exists(parent):
         os.makedirs(parent)
     Image.from_qimage(self._image).save(path)