How to use the LVGL PNG decoder / file system
So basically i have read the documentation about those and did-int understand really well how it works besides some better example code on the documentation would be great
By the way Documentation and Examples: i find it unclear, LVGL should have more examples included in the documentation about the PNG decoder.
i also have some other questions about it
Reducing Image File Size: Previously, i used the Online image converter - BMP, JPG or PNG to C array or binary | LVGL to include images in my ESP32 projects. However, i noticed that the converted files resulted in larger sizes. i wonder if using the PNG Decoder could potentially lead to smaller file sizes.
File Structure: The example codes refers to file paths like “A:folder/Img.png,” and i am unsure about what “A” signifies in this context.
Performance Comparison: Assess the processing performance of the PNG decoder in comparison to using C arrays for your images
1 fixed my mistake
2 Exacly the size of the image was like 800 bytes and the C arryay was 22 mb an i just have 16 mb of flash
3 i have never used a File system in embbeded before so i dont understanded exacly how it works what is the “root directory” that a letter means?
- iven if its faster how much faster is the C array becouse the file sizes diferences are huge
For the file system I have linked the docs for you. As for the size of the C file - after you compile, the program will have an even different size, but I assume having it already compiled in your program saves you the IO operations time at least.
But the size of the file after conversion it weird, for me a 121kB gif changed to a 3MB C file, so this was understandable. It seems to be an issue with the conversion
was a blank white image 800 x 480 (the whole sreen) i know its a big image but still not that big
S letter means like what folder it is , if i dont know what folder that letter is then i cant know where the image should go
What color format are you using? I just converted a whole one color 800x480 screen and it converted to a 15,7 kB file.
As for the file system - this image shows how to register a driver for a file system, but first you have to have a file system - you can read the section Ready to use drivers although I haven’t tried that.
PNG for the the file and my screen is running 16 bit and my conversion was like this
Try to use a different color format then - with CF_TRUE_COLOR my C files are also enormous, I previosly used CF_RAW if I’m not mistaken
that true using CF_RAW makes the image a lot smaller but i will test the quality diferences
using that color format my display shows nothing but artifacts