![convert image to qr code convert image to qr code](https://i.ytimg.com/vi/UyFp1yPS0lE/hqdefault.jpg)
![convert image to qr code convert image to qr code](https://is4-ssl.mzstatic.com/image/thumb/Purple123/v4/12/01/fd/1201fd2f-e012-f3e0-5dff-fb041b062778/source/512x512bb.jpg)
I can successfully convert my image to and from a bitmap to a hex string and then to a byte array, and back again to display it on my windows app, but i cant get guix’s hex string into a usable image. I already gave you the routine to do that!! I have no knowledge or interest in C# or I might have done it just for lols.
![convert image to qr code convert image to qr code](https://media.qrtiger.com/blog/2020/12/qrcode_27_800.jpeg)
If i use the hex that guix transformed the qr code into i cant seem to get it back into a bitmap format for use in my code, so i think the formatting is slightly out when c# converts it back into a bitmap from a byte. More likely the programmer than the language causing the problems ). Only problem now is trying to convert the image in c# to that hex format, i think c# does some funny things when it converts to and from hex and arrays etc. So starting at the top left corner you have 00000001 = 0x80, 11111101 = 0xbf, 10100100 = 0x25 etc you need to reverse the string of bits!īut you said you are generating your own QR codes, so surely you already have the arrays? So guix could you maybe share the code you used to convert the qr code in that hex string?
#CONVERT IMAGE TO QR CODE SERIAL#
I know i managed to get this working with a nokia 5110 lcd, i sent the byte via serial and stored in a int i think and sent that into a draw function provided by the lcd library and that worked out fine and displayed only issue was the resolution of the lcd was to low so qr code density was a issue, i could only store a few characters? Is there no simpler way of just converting a bitmap to byte in c# code and then sending over serial and storing it in a byte in arduino and drawing to tft with a quick library where you just pass the raw array into it? So guix, your suggesting writing a method which draws out the qr code bit for bit in a for loop basicly, correct? I get a corrupted image on screen so how do i use this then?
#CONVERT IMAGE TO QR CODE HOW TO#
Now how to i use this with the utft drawBitmap function, it complains about converting from const unsigned short int* to a unsigned int*. then i also used a 40 x 40 which then i tried to display.Ĭonst unsigned short char30 PROGMEM which i know is the wrong size, but its just the one i was using as a sample. Okay so heres the deal, i used a 290 x 290 which gave me the 168 200 bytes.