diff --git a/ramancom/WITecCOM.py b/ramancom/WITecCOM.py index 2eca5ec26ea88faebf2d160fda3550ce4a532c58..327fae7fe55141685eb9c7b44823f4736952e3e5 100644 --- a/ramancom/WITecCOM.py +++ b/ramancom/WITecCOM.py @@ -21,6 +21,7 @@ If not, see . import os import sys +import cv2 try: import pythoncom import win32com.client @@ -31,6 +32,7 @@ from time import sleep, time try: #when running the witectesting, the paths have to be differently, as it is in the same directory as the other raman com modules from .ramanbase import RamanBase from .configRaman import RamanSettingParam + from ..helperfunctions import cv2imread_fix, cv2imwrite_fix except: from ramanbase import RamanBase from configRaman import RamanSettingParam @@ -274,6 +276,9 @@ class WITecCOM(RamanBase): self.ImageNameMan.SetValue(fname) self.ImageSaveMan.OperateTrigger() sleep(.1) + img = cv2imread_fix(fname) + img = cv2.resize(img, None, fx=0.5, fy=0.5) + cv2imwrite_fix(fname, img) def getImageDimensions(self, mode = 'df'): """ Get the image width and height in um and the orientation angle in degrees.