On Wed, 28 Aug 2024 09:49:54 GMT, Tejesh R <t...@openjdk.org> wrote:

>> test/jdk/java/awt/Checkbox/CheckboxCheckerScalingTest.java line 78:
>> 
>>> 76:                         for (int j = 0; j < 
>>> imageAfterChecked.getWidth(); j++) {
>>> 77:                             Color pixelColor = new 
>>> Color(imageAfterChecked.getRGB(i, j));
>>> 78:                             if (compareColor(pixelColor)) {
>> 
>> Current pixel comparison suggests that the test passes even if one pixel 
>> satisfies the condition. This may give some false positive result.
>> Is it possible to test all pixel and then check the number of pixels passed 
>> against total number of pixels compared and if it is more than some 
>> percentage value ( may be ~85-90) then return true otherwise false.
>> 
>> This may lead to avoid the tolerance check if sufficient number of pixels 
>> are exactly black in color.
>
> Checker mark will be less than 50% of the image. The image captured is around 
> 8x8 pixels, in that we hardly can find 10% of black color (though with 
> tolerance of 5-10 value). Since we are making decisions based on black color 
> which is the actual checker color with tolerance, checking for one such match 
> would be fine.

Ok.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20723#discussion_r1734879957

Reply via email to