bwipp / postscriptbarcode

Barcode Writer in Pure PostScript
https://bwipp.terryburton.co.uk
MIT License
463 stars 65 forks source link

rectangularmicroqrcode: support ECIs and mode optimising #181

Closed gitlost closed 2 years ago

gitlost commented 2 years ago

Adds support for ECIs to rMQR, and mode optimisation using the existing implementation and arrays generated by new script "contrib/development/build-qr-mode-optim-arrs.php" (values based on ISO/IEC DIS 23941 Draft 2019-10-18).

There're some small changes to the existing values used by QR Code and Micro QR Code which should either leave the msgbits the same length or slightly shorter.

There's also a new check when setting the initial mode for mode A before K, which leads to shorter msgbits in some cases.

terryburton commented 2 years ago

Nice work harmonising the variants. Thanks!

terryburton commented 2 years ago

Purely for your interest, here's an issue that highlights a limitation of the general approach (which I haven't been able to devote any cycles to): https://github.com/metafloor/bwip-js/issues/237#issuecomment-1069720141

gitlost commented 2 years ago

Hi, thanks, yes, was tempted to make some changes to cater for cases like that but didn't want to disturb the codebase too much. Also as you're well aware with algorithms like this it's easy to fix one case only to unfix another. However I do think that with a few tweaks it could deal with a number of common cases better - will definitely give it try once I get the next version of Zint shipped (due some time this millennium)...

terryburton commented 2 years ago

Indeed, that why I've left it on the shelf until I have time to put it all back together in case things begin the unravel :-)

I'm not pushing you to look at it (really), but if you find the urge before I am able to then you are most welcome!