[1.1.4] macOS 10.14.5 - Taking a screenshot with SikuliIDE on an external monitor with a Retina primary display

Asked by corn on 2019-07-24

I have a retina macbook plugged into an external monitor. A normal screenshot from both monitors produces images like this:

Primary:
https://imgur.com/J4C7Fcl

External:
https://imgur.com/w7q19Xl

When I use SikuliIDE's "Take screenshot" functionality, it seems to resize everything in an odd way:

Primary:
https://imgur.com/1ZzqMXT

External:
https://imgur.com/sygNmDc

When running the capture tool, it seems that Sikuli is changing the resolution of my external monitor (possibly halving it?). Is this something that's happening to deal with retina display? Dividing the resolution by 2?

Currently, it's impossible to take a screenshot on the external monitor. I'm also having problems with Sikuli finding anything on the external monitor.

Does Sikuli support a setup that includes a primary retina display with an external non-retina display?

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2019-07-24
Last reply:
2019-08-19
RaiMan (raimund-hocke) said : #1

SikuliX version?

corn (ccabob) said : #2

I'm running Version 1.1.4 (2019-07-22_15:03 (Build 339)) and Java 11. My external monitor is 2560 x 1440 (QHD/WQHD - Wide Quad High Definition)

It's possible Sikuli doesn't handle the HD external monitor correctly?

corn (ccabob) said : #3

I've been trying to get Sikuli to recognize images on the external monitor, but with no luck. I've done a sample test to see if it could pick up lines of text in a document, but that doesn't work very well either.

https://imgur.com/a/JGDGQyI

Here is the relevant code to test line detection:

```
s = Screen(1)
r = s.grow(-485, -1750, -250, -1000)
r.highlight()

for l in r.collectLines():
    l.highlight()

wait(3)
```

It seems that highlighting the region works correctly, but the actual image that is captured by Sikuli is coming from Screen(0)? It seems to be stitching everything together incorrectly.

I used the "Matching Preview" feature of the IDE and this is how Sikuli is representing the dual monitor setup:

https://imgur.com/a/PjNGxGl

I actually have four documents open. "Document 1", "Document 2", "Document 3", & "Document 4". The first two documents are on Screen(0) and the second two documents are on Screen(1).

You can that documents 1 & 2 are visible from the primary monitor. Document 3, from the second monitor, is only partially visible and document 4, to the right of document 3, is completely out of the view.

RaiMan (raimund-hocke) said : #4

Thanks for reporting.

Confirmed if running with Java 12 (supposing 9, 10, 11 also, but not tested).

When using Java 8, it works as expected.

Not sure, how fast this can be fixed.

RaiMan (raimund-hocke) said : #5

I made it a bug.

Can you help with this problem?

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

To post a message you must log in.