← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #151213]: save captured screen or image on hard disk

 

Question #151213 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/151213

    Status: Open => Answered

RaiMan proposed the following answer:
I think you are using the Sikuli Java API on a very low level
(bufferedImage = in memory bitstream).

You should stay on the file level, if you do not have the need to do
something valuable with the image content.

String bf = s2.capture();

now bf contains the filename of the captured image in the temp folder.
You have to simply move it to your image folder.

That was exactly, what Anshu proposed, saying, you have to adapt it to
your situation.

BTW: I am not sure about your intention: your approach captures the
screen and not the specified region.

if you want to capture the region: (transcribing Anshu's suggestion)

Region reg = new Region( 50,100,1300,200);
String imgFile = Screen.capture(reg)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.