r/ArduinoProjects • u/thork_the_stork • Dec 25 '23
Compressing Bitmaps
Hi everyone!
First time here so I'm not sure how exactly to use this subreddit.
I've been programming on a Nano, soldered onto my PCB for a project. I have a loading screen animation for the project, but the bitmaps for the OLED screen take up the majority of the Arduino's space. They are set in the PROGMEM, but this added with the main code is 117% of its memory. Is there any way I can compress the bitmaps down and use those? I've heard the term RLE thrown around in forums but I have no clue how to use it, so there has to be another way.
Any help would be greatly appreciated. Have a great day!
0
Upvotes
1
u/DCorboy Dec 25 '23
Are you sure they’re the correct resolution? If so, another approach you can use is (pre) converting all your data to 565 color encoding (2 bytes/pixel) saving 1/3 over 24-bit color.
RLE will be beneficial if you have a lot of contiguous color, like a black background.