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

How to realize the two-dimensional code of art #61

Closed
fenglijunnb opened this issue Mar 23, 2020 · 11 comments
Closed

How to realize the two-dimensional code of art #61

fenglijunnb opened this issue Mar 23, 2020 · 11 comments

Comments

@fenglijunnb
Copy link

Not the black and white qr codes that we have now

@boombuler
Copy link
Owner

I'm not exactly sure what you mean, but if you just want to change the colors, have a look at the wiki:
https://github.com/boombuler/barcode/wiki/Colorized-barcode

@fenglijunnb
Copy link
Author

No, no, not changing the color, but changing the shape of the qr code
it399 com qrcode2
Something like that

@boombuler
Copy link
Owner

Doing something like this would require a little more coding then just using this library. You could generate the barcode, but if you want to add such artistic effects you have to get creative yourself.
Sorry for that

@fenglijunnb
Copy link
Author

I think you can try to try art two-dimensional code, after all, black and white will be eliminated, I hope you can listen to my opinion

@boombuler
Copy link
Owner

Such kind of things can be achieved by using tilesets and a little tinkering, it should not be very complicated, just pick a random tile from the set and do some floodfilling with the data from the barcode. This kind of stuff is very specific to your problem and should imho not be included in a general barcode lib. Its just a few lines of code if you know exactly what you want but much more code if you try to generalize it.

@fenglijunnb
Copy link
Author

So if you implement the following two-dimensional code, how will you operate, can you implement an example
it399 com qrcode2
In fact, its location is radian, and not black and white, we can give the two-dimensional code more style

@fenglijunnb
Copy link
Author

If this is the complexity of the picture, then we can also achieve this

image

image

@boombuler
Copy link
Owner

Looks like you already have a service to do this kind of barcodes?!? So why do you want a library which is used to generate the barcode data to create fancy images? That should be a job of a fancy drawing lib. At least the last one is so easy that anyone who just googles for about 2 minutes should be able to create such an image... just walk the barcode from this library pixel by pixel, if its a black one, draw a circle, otherwise do nothing...

@fenglijunnb
Copy link
Author

No, no, I got this service through the website, he needs money, if I want a lot, I need more money, in order to reduce unnecessary expenditure, so I need to ask you how to operate

@huysentruitw
Copy link
Contributor

The 3 examples here can be perfectly generated using this library or my .NET port at https://github.com/huysentruitw/barcoder

Your first example is just an image wrapped around the original QR code in the center. The last two examples just use a different style of rendering the square dots.

You can make all based on the 2-dimensional data you get from the qrcode class.

The special kind of rendering you're requesting is outside the scope of this library (and my port). Also, there is a reason why that service is requiring money for their work. The free labor we do as open-source developers is limited.

@fenglijunnb
Copy link
Author

@huysentruitw Pardon my stupidity.You really don't see your code.And it is not the code of go, so I really can't take your advice, but I hope you can provide a style qr code of go

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

3 participants