My aim is to find a specific picture on the screen by taking a screenshot of the whole screen and find the picture (saved in the resources of the app) by comparing the pixels.
The problem I´m facing at the moment is the part where I take a screenshot of a MacBookPro with Retina display. The resolution is 2880*1800. But with the following code (working fine on windows), I only get a screenshot with 1920*1200.
new Robot().createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize())
Obviously the screen size is wrong but even when I use 2880*1800 hardcoded, the screenshot only is 1920*1200 with black frame around.
Does somebody know how to take the screenshot with the right resolution?