Question #661561 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/661561
Status: Open => Answered
RaiMan proposed the following answer:
Capture since the beginning in 2010 is a prominent feature in SikuliX,
but also the API/usage differed on the 3 levels IDE/Python/Java from
beginning.
Over the time I tried to smooth the differences and add features in the sense
of your request.
But I have to admit, that the docs do not really talk about ;-)
Internally a capture in all its variants creates a ScreenImage object, that in
the first place holds an in-memory image representing the captured pixels.
ScreenImage has methods to store the image in various places.
But due to backward compatibility reasons at the Python level the problem
cannot be solved by augmenting the capture() command.
This is still valid:
http://sikulix-2014.readthedocs.io/en/latest/screen.html#Screen.capture
To get access to the intermediate ScreenImage object from the Python level, you
have to say
screenImage = SCREEN.capture(<parameters as doc'ed>)
... then you have
screenImage.saveInBundle(name) # save in current bundle path using name (.png
can be omitted)
screenImage.getFile(path, name) # save in given path using name (.png can be
omitted)
I have not yet decided, how to finally solve the problem, but I will add
least add the above as a note to the docs of capture().
In this sense thanks for the question.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp