Hello community. I got a problem. While using my enchanted 3.5" display I've tried to make my display look fancy and imported some background images. The original image was in .png format with the size of 5KB. After such image was uploaded through nextion editor to my project, the size of the project increased by about 300 KB. I've tried different compression techniques: bmp, jpeg, gif, etc. Noting seemed to work. From what I can see now even the enchanted displays are not exactly capable of large scale graphical project handling, or am I doing something wrong, ITEAD ?
I'm pretty sure that the images will be stored as native bitmaps since the display won't have the power to decompress the images on the fly.
But when you said you used BMP (which should be uncompressed already) you should not see a lot of change in size.
Hmm, this makes sense, I'll try to work on BMP optimization, thank you.
There's not a lot you can "optimize" on BMPs.
Each pixel is represented via 2 byte so you will always have (width * height * 2) + (BMP file header size, if apicable) bytes to store a bitmap.
I think Nextion uses R5G6B5 or short 565 color coding.
Scruff.r is mostly correct. The Nextion Editor can translate several graphic formats, which is immediately formatted to 565 16-bit color format, 2 bytes per pixel, from start to finish. (There is no other external BMP "header" taken from the image file, so there is nothing to optimize from the graphics file before importing). The HMI uses 23 bytes per original picture in its internal index.
The optimizations you could make is limiting your use of graphics. Rather than using full screen (320x480) background pictures that use 307,200 bytes, perhaps consider using some solid colors, and include them more sparingly.
I will also state, that it is possible to send the image of 307200 bytes over Rx/Tx from your host MCU to the Nextion Display - albeit slower than from flash. In this fashion, a host like the Intel Edison natively could house a project 1.8GB in size. An Arduino with a 32GB SD on its host side could in theory be close to that 32GB, so ... it is how you think of organizing your HMI and what resources you are going to employ in your project.