On Fri, 10 Jun 2022 09:25:29 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> Probably we can apply the defensive fix of color tolerance as per 1st >> iteration ? > > It still fails once or twice with createMultiResolutionScreenCapture if the > test iteration is increased, so I think color tolerance, even if defensive, > is the one to go for. > On the HiDPI screen that MRI will have two images, and my expectation is that > the image requested by the updated test and the image used before the fix > should be the same. In this case, yes, the image will be the same as before: a scaled down bitmap you get with regular `createScreenCapture`. > How to find those 2 bufferedimages returned by > createMultiResolutionScreenCapture and createScreenCapture are same or not > apart from pixel check (which shows obviously they are not same and color > differ by 1)? You can get the largest variant, and compare colors there. Yet the size of the two images will be different, most likely. ------------- PR: https://git.openjdk.org/jdk/pull/9011