Page 2 of 2
Re: QR Code generator library ported to PB
Posted: Sat Jan 16, 2021 8:16 pm
by mk-soft
Great, thank you very much.
Now no more external DLLs.
Searched for URL example

How to find the source code in the forum again
Code: Select all
img = qrcodegen::CreateTextImage("https://www.purebasic.fr/english/viewtopic.php?f=12&t=76558")
Re: QR Code generator library ported to PB
Posted: Sat Jan 16, 2021 9:38 pm
by Saki
Very nice and useful.
Re: QR Code generator library ported to PB
Posted: Sat Jan 16, 2021 11:49 pm
by tft
OK .....
Code: Select all
;tex$ = "https://www.sourcemagic.ch/index.html"
;tex$ = "mailto:info@sourcemagic.ch/index.html"
tex$ = "BEGIN:VCARD"+#CR+#LF+
"VERSION:4.0"+#CR+#LF+
"FN:Temucin SourceMagic"+#CR+#LF+
"N:Temucin;Turgut;;;"+#CR+#LF+
"ADR:;;Bagnhofstr.15;Dachsen;Schweiz;8447;Zürich"+#CR+#LF+
"TEL;TYPE=cell,work:+41796050735"+#CR+#LF+
"EMAIL;TYPE=work:turgut.temucin@sourcemagic.ch"+#CR+#LF+
"ORG:GAMES"+#CR+#LF+
"NOTE:Privatuntericht : Programmieren lernen"+#CR+#LF+
"URL:HTTP://www.sourcemagic.ch"+#CR+#LF+
"End:VCARD"+#CR+#LF
img = qrcodegen_CreateTextImage(tex$)
Re: QR Code generator library ported to PB
Posted: Sat Jan 16, 2021 11:58 pm
by ChrisR
Superb and very useful, thank you for sharing

Re: QR Code generator library ported to PB
Posted: Tue Jan 19, 2021 3:52 pm
by loulou2522
Hi iinfratec,
Is it possible to have a pbprogramm which read PDF, PNG,JPEG ?
THanks for answering
Re: QR Code encoder library ported to PB
Posted: Sat May 01, 2021 5:44 pm
by fluent
Very good job, thanks!
2 questions:
1/ Where in the code could I change the size of a "dot" (or the resulting qr-code image)? I've tried ResizeImage but it produces bad artefacts which often make the code unreadable by my smartphone
2/ Is it feasible to use a "round dot" style? Like in this example:

Re: QR Code encoder library ported to PB
Posted: Sat May 01, 2021 8:03 pm
by Saki
Hi,
it's not my code, but I'll give an answer.
Technically it is unwise to make it round, because you remove information giving content.
You must set the #Raw flag when resizing and you must not create the images as JPEG, but as PNG or BMP.
Best Regards Saki
Re: QR Code encoder library ported to PB
Posted: Sun Aug 29, 2021 7:42 pm
by thanos
@infratec
Amazing work!
Thanks a lot!
It seems does not support unicode characters
Regards
Re: QR Code encoder library ported to PB
Posted: Fri Dec 10, 2021 12:12 pm
by Rinzwind
Anyway to make it process utf8 correctly? It only works with plain ascii at the moment while the mentioned page at
https://www.nayuki.io/page/qr-code-generator-library does work correctly. Example text: ภาษาไทย
Re: QR Code encoder library ported to PB
Posted: Fri Dec 10, 2021 2:03 pm
by mk-soft
Part encodeText adapted text (#Mode_BYTE) from ASCII to UTF8.
works fine with my Mobil App "Barcode Scanner"
Re: QR Code encoder library ported to PB
Posted: Fri Dec 10, 2021 9:58 pm
by infratec
I updated both versions on the fisrt page.
Also synchronized with the latest github version from 10 days ago.
Re: QR Code encoder library ported to PB
Posted: Fri Apr 07, 2023 2:28 am
by Lunasole
Your code seems good (as many of your codes).
There is Notepad++ plugin to generate QR of selected text, but it seems really bugged.
May make another plugin of that library
Re: QR Code encoder library ported to PB
Posted: Thu Nov 09, 2023 2:19 pm
by PeteM
Anyone know how to change the background colour of the image, or to make it transparent?
Re: QR Code encoder library ported to PB
Posted: Thu Nov 09, 2023 3:18 pm
by infratec
Modified the code in the first post.