Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

同一配置下二维码生成的白边宽度不一致 #259

Open
woodboard opened this issue Oct 10, 2024 · 5 comments
Open

同一配置下二维码生成的白边宽度不一致 #259

woodboard opened this issue Oct 10, 2024 · 5 comments

Comments

@woodboard
Copy link

通过方法
createQRCode(String content, int heightPix, Bitmap logo, @FloatRange(from = 0.0f, to = 1.0f) float ratio, Map<EncodeHintType, ?> hints)
的 hints[EncodeHintType.MARGIN] = 1 //default is 4 设置了固定的白边边距,但是针对不同的二维码内容生成的二维码有不同白边边距,特别高密度二维码容易产生更多的白边,为什么?如何解决?

@woodboard
Copy link
Author

版本3.1.1

@jenly1314
Copy link
Owner

EncodeHintType

这是zxing提供的配置,具体可参见:EncodeHintType 的定义;印象中好像还与生成的二维码版本有关系,你可以尝试添加 EncodeHintType.QR_VERSION 相关配置。

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Nov 28, 2024
@Allen8Lee
Copy link

Allen8Lee commented Nov 28, 2024 via email

@github-actions github-actions bot removed the Stale label Nov 29, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Dec 30, 2024
Repository owner deleted a comment from Allen8Lee Dec 31, 2024
@github-actions github-actions bot removed the Stale label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@jenly1314 @Allen8Lee @woodboard and others