mapbox / pixelmatch

The smallest, simplest and fastest JavaScript pixel-level image comparison library
ISC License
6.15k stars 305 forks source link

Comparing two pictures with different text returns no diff #117

Closed diklaby1 closed 2 years ago

diklaby1 commented 2 years ago

I'm trying to compare two pictures of a dialog with different titles, but pixelmatch return diff = 0. Am I missing anything? I've tried different values of threshold screenshot createPipelineDialog

mourner commented 2 years ago

I'm not sure how you're using pixelmatch since you didn't provide any details, but it works properly on the images above for me, producing this diff:

diff

diklaby1 commented 2 years ago

Thank you for your response. It seems that I had a bug in my code (I'm using a framework called playwright which makes the code hard to debug) I'm now getting the result as expected.

Thanks!

On Wed, Aug 10, 2022 at 1:51 PM Volodymyr Agafonkin < @.***> wrote:

I'm not sure how you're using pixelmatch since you didn't provide any details, but it works properly on the images above for me, producing this diff:

[image: diff] https://user-images.githubusercontent.com/25395/183883886-ced494b8-c42e-4f19-a87e-d6a6604e9d75.png

— Reply to this email directly, view it on GitHub https://github.com/mapbox/pixelmatch/issues/117#issuecomment-1210504276, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2NDZ55A4BHZ7KSCONR7FDDVYOCS5ANCNFSM552NJMTA . You are receiving this because you authored the thread.Message ID: @.***>