Is it possible to change the 'dot' shape i

2019-08-01 11:51发布

Currently, I'm using ZXing to generate QR Codes. I have no problems in generating and reading the codes, and can change the colour scheme without any issues. I was wondering if it is possible to change the shape of the generated codes from the traditional squares to 'dots' or circles using ZXing?

I've seen images and examples of this, but I haven't seen any example solutions using ZXing.

Looking for something like:

enter image description here

If it is possible to do with ZXing? I would appreciate any example code.

2条回答
Animai°情兽
2楼-- · 2019-08-01 12:07

I had a similar issue. I ended up forking zxing and using JitPack to include my fork with Maven. I implemented functionality for RGB masking and for drawing circles and outlined squares as dot shapes. Here is the repository: https://github.com/flotwig/zxing

查看更多
相关推荐>>
3楼-- · 2019-08-01 12:13

The library doesn't render the QR code actually, excepting that there's a bit of utility code to write it out as an image in the javase/ module. So I think you would mostly be writing your own code or copying a bit of that. It's not hard. I don't think it's a great idea to render this way as it hurts readability, but probably still substantially works.

查看更多
登录 后发表回答