manuelbl / SwissQRBill.NET

.NET library for Swiss QR bill payment slips (aka QR-Rechnung)
MIT License
88 stars 33 forks source link

Swiss cross as path with explicit points #47

Closed reureu closed 2 years ago

reureu commented 2 years ago

The Swiss cross is now a path with explicit points. It slightly changed the cross when rendered as PDF or PNG. Consequently, the affected reference files have been updated. I don't quite understand why the QR-code of A4BillTest.CreateA4PdfBill3.verified.png file changes after changing the path of the Swiss cross. (08455ccbc906dd5ab0d057abf886c8708b626090).

manuelbl commented 2 years ago

Thanks for the PR. Have you tested it with Apache FOP? Does it solve that problem?

A4BillTest.CreateA4PdfBill3.verified is indeed a bit strange, but it hasn't been caused by your change. It still uses the pre-3.0 QR code encoding and must have slipped through somehow. The image comparison allows for minor difference. Possibly, it was still within limits even though the QR code changed with 3.0 and now the minor change has pushed it over the limit.

I'm more surprised about the other 2 PNG files that have changed as they don't have any visible change. I'll look into it later.

reureu commented 2 years ago

What I find a bit surprising about A4BillTest.CreateA4PdfBill3.verified is that a minor change of the Swiss cross shall not completely change the QR-code, but it does. So there is probably something else causing this regression.

As for the 2 PNG files, if you diff the resulting images you will see that the points C, F, I and L (see comments in commit 86ae4403aaa91edf91d0c48e7b567c402caf4e83) of the Swiss cross are slightly brighter than before.

And yes, it does work with the AFP-renderer of Apache FOP!

reureu commented 2 years ago

@manuelbl , Thanks a log for merging this PR. We are looking forward to the next release. Kind regards, Reureu

manuelbl commented 2 years ago

Version 3.0.3 including this PR has been released.