B4J Question [solved] QrGenerator AddBitmap

udg

Expert
Licensed User
Longtime User
Hi all,

on post #18 of the b4x library QrGenerator, there's some code that calls qr.AddBitmap but compiler gives error since it appears there's no sub with that name in the module.
QrGenerator version 1.60

My goal is to add some overlying text on a QrCode (exactly like the logo in the example). So even the use of the internal canvas with a DrawText would be ok for me.

Can you help? TIA
 

udg

Expert
Licensed User
Longtime User
Hi @Erel,
I'm not sure to understand it correctly.
If I simply overwrite a portion of a QrCode (provided it's a limited area) the reader would be given enough information to correctly decode? I think so since it should be the reason for an ECC embedded in the code itself.
So, it doesn't matter if I add the "error" before encoding or after its generation?

Update: sorry, re-reading the above, showed me how unclearly I expressed myself. I generate a QrCode; then I put a label or a second imageview over the original one sporting the code. Then I have to "fuse" them in a single image/bitmap in order to save it as a file. Is that what you suggest?
Why not "alter" the final QrCode writing on its canvas or mixing two bitmaps (one from qr.create and the other sporting a logo) while in the generation of the code step?

Second question is "what is AddBitmap" and where am I supposed to find it? I mean, "as is" the showed code on original thread wouldn't work, right?
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
If I simply overwrite a portion of a QrCode (provided it's a limited area) the reader would be given enough information to correctly decode?
Yes.

Second question is "what is AddBitmap" and where am I supposed to find it?
Check the project attached to post #18.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Check the project attached to post #18.
Found, thank you.
Should we consider it an "official" addition to next version of QrGenerator or was it there just for that specific demo code?
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…