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

Can not trace exactly QRcode Image #11

Open
huynhnhathoangit opened this issue Jun 16, 2022 · 3 comments
Open

Can not trace exactly QRcode Image #11

huynhnhathoangit opened this issue Jun 16, 2022 · 3 comments

Comments

@huynhnhathoangit
Copy link

Can not trace exactly QRcode Image, there is an error inside QRCODE image when trace it.
image

@jankovicsandras
Copy link
Owner

Hi,

I tested this command below and it gave me an acceptable SVG of the QR code. Can you please explain the problem with more details?

java -jar ImageTracer.jar qr.png

qr png

@huynhnhathoangit
Copy link
Author

Hello @[jankovicsandras]
Thanks for your reply.
I problem is the output SVG file of QR code was broken and can not SCAN,
As you can see, the left side is origin QR code can Scan with camera: value: 0, but the right side have error some part inside, so can not scan.
image

@jankovicsandras
Copy link
Owner

Yes, I see your problem: some white square "holes" are filled black on the right side, which destroys the QR code. I guess the problem is with the colors: the source might have transparency instead of white, and despite ImageTracer probably can trace these "hole" squares correctly, this older Java version is using stack based rendering, which means transparent on top of black is still black.

Stack transparency problem

See also imagetracerjs Issue Seven
This is fixed in imagetracerjs 1.2.0 , but this Java version is 1.1.2 . I'm planning to port this fixes to the Java versions, but I don't know when I will have time.

Despite all of this, I still got acceptable result by saving your left side PNG, and tracing with the command above, so you might be able to fix this also with another color palette.

qr2 png

Can you please upload this right side image as the SVG result from ImageTracer (so do not convert it to PNG)?

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

2 participants