Create Image on the fly

Asked by Jeff_Vallis

1.1.0(2015-06-23_01:00nightly)/Mac10.10.4/Java8(64)1.8.0_25-b17

I know where an Avatar is positioned on the screen but do not know what the image is and I need to find this image later so is there a way to set an image from a region.
or
Have found the way to take a screen shot of the selected region and saved it as (path)/TheAvatar.png
can I set a variable to this image.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eugene S (shragovich) said :
#1

If you already have an image captured with something like this:

capturedImage = capture(someRegion)

you can create a Pattern from it:
pattern = Pattern(capturedImage).similar(.95).targetOffset(x, y)

You can then use the Pattern object with Region class:

reg = Region()
reg.find(pattern)

Can you help with this problem?

Provide an answer of your own, or ask Jeff_Vallis for more information if necessary.

To post a message you must log in.