red6 / pdfcompare

A simple Java library to compare two PDF files
Apache License 2.0
220 stars 66 forks source link

Fix expected/actual colors #126

Closed avl93 closed 1 year ago

avl93 commented 1 year ago

According to README.md, by default expectedColor=D20000, and actualColor=00B400. But in the code, it is actually messed up.

The only little problem I see with this fix - it will be unconvenient for users who, like me, didn't notice this and use PdfComparator(actual, expected) (inverted parameter order gives "normal" colors).

finsterwalder commented 1 year ago

How about just changing the README and not changing the behaviour? The expected pixels are supposed to be green and the pixels that show up but where not expected should be red. So the behaviour is correct in my opinion. Just the README is wrong. That that would be less of a change for existing clients.