sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #58007
Re: [Question #700491]: Converting Image Object to Screen Object
Question #700491 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/700491
Status: Open => Solved
Nano Stray confirmed that the question is solved:
I was very lucky to have found out the answer by myself. I still don't
know why this works but here's the solution:
You can convert Image variable to Buffered Image by using the .get()
function
CUT_OUT_IMAGE= Image(CAPTURED_IMAGE).getSub(CUT_OUT_REGION) #This gives back an Image variable
BUFFERED_IMAGE= CUTOUT_iMAGE.get() #converts Image variable to Buffered Image
FILE_PATH= os.path.dirname(getBundlePath()) + "\\test.png" #this is a sikuli project directory
ImageIO.write(BUFFERED_IMAGE, "png", File(FILE_PATH)); #
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.