matkar wrote:To correct the missing images substitute function:
void handle_image() withCode: Select allvoid handle_image() {
WiFiClient client = server.client();
client.write(image, sizeof(image));
server.send(200, "image/png", "");
}
I was searching for an application that would transform png images to the necessary byte array. Unfortunately I couldn't find any. If anybody knows where to get one, please let us know.
Hi the pgrogram that i used is: LCDassistand you can downloa here: https://github.com/hulkco/Tools
But we carefull, I'd suggest the following page:
https://learn.adafruit.com/mini-thermal ... p-printing
Though this one's about thermal printers, the tips all apply to LCD/OLED use as well...pad to multiple of 8, add PROGMEM to array declaration, etc. (One change: use the original bitmap width when calling drawBitmap(), only round up when doing the conversion.)
For smaller pictures the parsing can be done manually with the help of some tools. I used http://www.fileformat.info/tool/hexdump.htm online service to convert my PNG to hex. I copied the result to libreoffice writer where I removed the unnecessary portions (columns) and added "0x" columns and commas to the array. This way it takes only a few minutes for a small picture to adapt it to the correct format.
Regards,
Mat
Moderator: igrr
One of those is https://github.com/tristan2468/Hexy supporting drag-n-drop, which also provide an already compiled bin for Windows.
On Linux, there is the off-the-shelves "xxd" that does the job at command-line.
RichardS
Hulkco wrote:matkar wrote:To correct the missing images substitute function:
void handle_image() withCode: Select allvoid handle_image() {
WiFiClient client = server.client();
client.write(image, sizeof(image));
server.send(200, "image/png", "");
}
I was searching for an application that would transform png images to the necessary byte array. Unfortunately I couldn't find any. If anybody knows where to get one, please let us know.
Hi the pgrogram that i used is: LCDassistand you can downloa here: https://github.com/hulkco/Tools
But we carefull, I'd suggest the following page:
https://learn.adafruit.com/mini-thermal ... p-printing
Though this one's about thermal printers, the tips all apply to LCD/OLED use as well...pad to multiple of 8, add PROGMEM to array declaration, etc. (One change: use the original bitmap width when calling drawBitmap(), only round up when doing the conversion.)
For smaller pictures the parsing can be done manually with the help of some tools. I used http://www.fileformat.info/tool/hexdump.htm online service to convert my PNG to hex. I copied the result to libreoffice writer where I removed the unnecessary portions (columns) and added "0x" columns and commas to the array. This way it takes only a few minutes for a small picture to adapt it to the correct format.
Regards,
Mat
https://epartsconnect.com
Live realtime stock market prediction website. https://www.stocksignalslive.com my latest creation. Uses AI and machine learning.
New site featuring ESP8266 and ESP32 projects. tutorials, and news.
http://EverythingESP.com
ESP8266.com Founder and Administrator
The Mind Factory (get more from your 3D printer)
Home of the ESP8266, ESP8285, and ESP32 microcontrollers....