diff --git a/scanslicer/controller_detection.py b/scanslicer/controller_detection.py index 925a795..c8bab9d 100644 --- a/scanslicer/controller_detection.py +++ b/scanslicer/controller_detection.py @@ -62,3 +62,10 @@ class AutotuneTask(QRunnable): except Exception as exc: details = f"{exc}\n\n{traceback.format_exc()}" self.signals.failed.emit(details) + + +# rgb_array_to_qimage: function definition for ScanSlicer behavior. +def rgb_array_to_qimage(image): + h, w, c = image.shape + bytes_per_line = c * w + return QImage(image.data, w, h, bytes_per_line, QImage.Format_RGB888).copy()