tinyGS icon indicating copy to clipboard operation
tinyGS copied to clipboard

Convert tinygs logo in internal web page from base64 to binary array.

Open bertrik opened this issue 1 year ago • 1 comments

A remark of an earlier merge request for adding a favicon, was that it adds some more data to flash / program memory. Especially the esp32c3 suffers from this.

This patch changes how the tinygs logo data is stored internally, from base64 to a byte array. Base64 causes about 33% inefficiency by the way it is stored. I copied the logo exactly as it appeared earlier, but now instead of using it as inline base64 in html, it is stored as a binary array at /logo.png.

Difference in memory use:

  • original beta branch:
Retrieving maximum program size .pio/build/esp32c3/firmware.elf
Checking size .pio/build/esp32c3/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  16.9% (used 55500 bytes from 327680 bytes)
Flash: [========= ]  92.5% (used 1211912 bytes from 1310720 bytes)
 
  • with this patch:
Retrieving maximum program size .pio/build/esp32c3/firmware.elf
Checking size .pio/build/esp32c3/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  16.9% (used 55500 bytes from 327680 bytes)
Flash: [========= ]  92.2% (used 1209132 bytes from 1310720 bytes)

bertrik avatar Oct 20 '24 11:10 bertrik

Hm, might also combine this with https://github.com/G4lile0/tinyGS/issues/242 The display='inherit' part is repeated in this patch

bertrik avatar Oct 20 '24 12:10 bertrik

Thanks for the pull request.

G4lile0 avatar Feb 23 '25 11:02 G4lile0