Comments (34)
Here is a description of the BMP format.
You need to understand the BMP format correctly.
http://wiki.gis.com/wiki/index.php/BMP_file_format
from esp-idf-st7789.
I used the paint tool on my PC to adjust the depth of the image from 1 to 24, then I added the font folder to run the program and display it. I have now created a QR code bmp with a depth of 1 bit and saved it to my device's spiffs memory
from esp-idf-st7789.
When I have time, I will add a display of monochrome images (QR code).
from esp-idf-st7789.
Maybe next weekend.
I have a job at weekday.
from esp-idf-st7789.
I added QRTest function()
Try latest.
from esp-idf-st7789.
This is 1 bit depth bmp file. I think you will need it.
qrcode_1bit.zip
This is currupt file.
$ identify qrcode_1bit.bmp
qrcode_1bit.bmp BMP3 105x105 105x105+0+0 1-bit sRGB 2c 1742B 0.000u 0:00.000
identify-im6.q16: length and filesize do not match `qrcode_1bit.bmp' @ error/bmp.c/ReadBMPImage/835.
from esp-idf-st7789.
You can fix it using convert,
$ convert qrcode_test.bmp qrcode_test2.bmp
convert-im6.q16: length and filesize do not match `qrcode_test.bmp' @ error/bmp.c/ReadBMPImage/835.
$ identify qrcode_test2.bmp
qrcode_test2.bmp BMP 84x84 84x84+0+0 1-bit sRGB 2c 1154B 0.000u 0:00.000
from esp-idf-st7789.
Can you edit the code file so that it generates the correct bmp file?
No.
This is not my issue.
from esp-idf-st7789.
I used on-line qr code generator.
Plz google [QR generator]
When I have a problem, can I contact you ?
If it's related to this repository, it's possible, but otherwise it's not possible.
from esp-idf-st7789.
Plz google [linux convert]
from esp-idf-st7789.
It's usually like this:
Create your QR code using online generator
Use the [identify] command to check the image format, number of colors and size of the BMP
Change image format if you want, using [convert] command
Resize image using [convert] command
Convert to monochrome image using [convert] command
It is OK if such a file is created at the end.
$ identify qrcode_test2.bmp
qrcode_test2.bmp BMP 84x84 84x84+0+0 1-bit sRGB 2c 1154B 0.000u 0:00.000
Please do your own research later.
Good luck!
from esp-idf-st7789.
The easiest way is to find a REST server that creates a BMP image of the QR code.
Example:
Send Get request to REST Server:
http://hogehoge.com/create-qr-code/?data=HelloWorld!&size=100x100&depth=1
Receive a BMP image that depth=1 from a REST server using GET.
Save the received BMP image in SPIFFS with the BMP extension.
But I can't find such a REST server.
from esp-idf-st7789.
Currently I have generated an ESP32 + ESP-IDF QR code (I sent it above for you to see) and saved it as a bmp file into the device's SPIFFS memory,
Good!!
I searched for something like that but couldn't find it.
Very original.
Plz Publish it on github when you're done.
from esp-idf-st7789.
Thanks for your reply, after I researched based on your link I found an example of a 2×2 pixel, 24-bit bitmap (Windows DIB header BITMAPINFOHEADER) with pixel format RGB24 and an example of a 4 ×2 pixels, 32-bit bitmap. I can't find 1-bit bitmap example, can I use bmp header, dib header in your library for my purpose? If not, can you guide me? Currently I want to display QR image on TTGO, but I can only create QR bmp file with 1 bit depth and I need your help. I'm just a student, so I don't have the ability, experience to fully understand, hope you can take the time to help me to complete this project. I will try to learn all your guidance,
Thank you.
from esp-idf-st7789.
I used your library and here are the results. This is a 24 bit depth bmp image
This is a 1 bit depth bmp image
from esp-idf-st7789.
I used your library and here are the results. This is a 24 bit depth bmp image
I want your 24 bit depth bmp image file.
from esp-idf-st7789.
qrcode_24bit.zip
The bmp file is inside
from esp-idf-st7789.
When I have time, I will add a display of monochrome images (QR code).
Thank you for your help, can you tell me how long it will take? Because I also have to finish before the deadline. Sorry if this took your time. If you need anything from me please contact me immediately, I am happy to receive it.
from esp-idf-st7789.
Maybe next weekend.
I have a job at weekday.
Thank you so much !!!
from esp-idf-st7789.
This is 1 bit depth bmp file. I think you will need it.
qrcode_1bit.zip
from esp-idf-st7789.
Thank you very much, I will try it next monday and give you feedback. Hope they help me.
from esp-idf-st7789.
I added QRTest function()
Try latest.
Hello,
I tried running with your bmp file with width and height of 240 pixels and it was successful on TTGO T-Display ESP32. Then I tried to use the image with width and height less than 240 pixels, TTGO T-Display ESP32 got error Guru Meditation Error: Core 1 panic'ed (LoadProhibited).
After I debug I found the command line
if ( (sdbuffer[buffidx] & mask) != 0) colors[index] = WHITE;
I don't know if the memory allocation for the sdbffer pointer is related to the error when I change another bmp file with a size other than 240 pixel
s.
from esp-idf-st7789.
I tested with a 120x120 BMP file.
It worked fine.
$ identify qrcode.bmp
qrcode.bmp BMP 120x120 120x120+0+0 1-bit sRGB 2c 2050B 0.000u 0:00.000
Check your bmp using identify.
There is another cause.
from esp-idf-st7789.
I tested it and it returns the following result
$ identify qrcode_test.bmp
qrcode_test.bmp BMP3 84x84 84x84+0+0 1-bit sRGB 2c 1.07KB 0.000u 0:00.000
identify-im6.q16: length and filesize do not match `qrcode_test.bmp' @ error/bmp.c/ReadBMPImage/826.
Looks like I created a bmp file that doesn't match, although when I scan it still works. The difference that I see is the file format BMP3 and BMP and both are 1 bit depth.
This is the library used to generate the QR code that I am using. Can you help me take a look and fix it for TFT?
gen-qrcode.zip
from esp-idf-st7789.
For some unknown reason, this program does not create the correct BMP.
$ identify qrcode_test.bmp
qrcode_test.bmp BMP3 84x84 84x84+0+0 1-bit sRGB 2c 1070B 0.000u 0:00.000
identify-im6.q16: length and filesize do not match `qrcode_test.bmp' @ error/bmp.c/ReadBMPImage/835.
from esp-idf-st7789.
Thank you, I will try it !!!
You can fix it using convert,
$ convert qrcode_test.bmp qrcode_test2.bmp convert-im6.q16: length and filesize do not match `qrcode_test.bmp' @ error/bmp.c/ReadBMPImage/835. $ identify qrcode_test2.bmp qrcode_test2.bmp BMP 84x84 84x84+0+0 1-bit sRGB 2c 1154B 0.000u 0:00.000
from esp-idf-st7789.
You can fix it using convert,
$ convert qrcode_test.bmp qrcode_test2.bmp convert-im6.q16: length and filesize do not match `qrcode_test.bmp' @ error/bmp.c/ReadBMPImage/835. $ identify qrcode_test2.bmp qrcode_test2.bmp BMP 84x84 84x84+0+0 1-bit sRGB 2c 1154B 0.000u 0:00.000
It worked fine.
Can you edit the code file so that it generates the correct bmp file?
from esp-idf-st7789.
Sorry and thank you for your support.
I want the device to be able to generate QR codes on its own and they can be displayed on the screen, but currently the way to generate QR codes is not correct.
Can you guide me how to generate the correct QR code? When I have a problem, can I contact you ?
from esp-idf-st7789.
Thank you !!!
from esp-idf-st7789.
I have a one hint.
It helps if you know how to use the convert command.
from esp-idf-st7789.
I think the way you instruct is how to generate a QR code when using a command entered from the keyboard. But I need to write a library so that when loaded into the chip it will automatically generate a QR code when conditions are met.
I wonder is it possible to create a function that functions like the convert command? That seems like an impossibility, right?
I tried convert and it worked. Thanks for this helped me.
from esp-idf-st7789.
But I need to write a library so that when loaded into the chip it will automatically generate a QR code when conditions are me
You can create a QR code BMP file using ESP32 + ESP-IDF.
However, it is inappropriate to include that feature in this repository.
This will be a completely different repository.
It is necessary to consider how to enter the text string that is the basis of the QR code.
from esp-idf-st7789.
With my current ability the things you suggest are first known. Currently I have generated an ESP32 + ESP-IDF QR code (I sent it above for you to see) and saved it as a bmp file into the device's SPIFFS memory, but the generated file has problems and it doesn't show up on the screen. I will fix the file save function first, if not I will learn your way.
Thank you very much.
from esp-idf-st7789.
Okkk !!!
from esp-idf-st7789.
Related Issues (20)
- TFT backlight not powered on for Lilygo TTGO T-Watch-2020 HOT 4
- Please add a LICENSE to this repository HOT 1
- IMAGE HOT 4
- Just use u lib
- IMAGE HOT 14
- Preventing black screen while refreshing text HOT 5
- PlatformIO IDE use
- Video playing HOT 2
- Improve performance with frame buffer and DMA HOT 28
- Can not auto reset on my board HOT 24
- No demo appears on screen HOT 3
- This Project can not work on esp32C3 HOT 6
- did you original this st7789 library? HOT 2
- SVG logging HOT 1
- Not working in ESP-IDF5.0 HOT 5
- Slow Refresh Rate of ST7789 Screen Compared to ESP-IDF Screen Library HOT 5
- demo worked, but only 240x240? HOT 1
- SPI data is sampled on rising edge of clock, wrong mode? HOT 1
- Variable 'size' overflows in function lcdDrawFinish() when setting the resolution to 320*240 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-idf-st7789.