I have not tried this…but please let us know if you do. Note that this will only work with BMP for now (for internal reasons) but will support GIF and JPEG later.
By the way, there is 4MB of QSPI flash that has not been used yet. So one day in the future, you will get an additional 4MB of storage
var sd = StorageController.FromName(@"GHIElectronics.TinyCLR.NativeApis.STM32F4.SdCardStorageController\0");
var drive = FileSystem.Mount(sd.Hdc);
var file = new FileStream($@"{drive.Name}image.bmp", FileMode.Open);
var bt = new Bitmap(file);
I added an icon as a gif to resources. It increased the size by about 3200 bytes.
I added the same icon as a bitmap. It increased the size by about 11000 bytes
Most important question - were you able to use the GIF? If so, great, it’ll save you on application space, but it’s still going to be a bitmap internally so once loaded you’re still going to use the same memory
So the flash will be smaller by using a GIF (yes it did work fine). RAM is used during execution, how much RAM is available ? I could be using several icons at a time, if the RAM used is the bmp size then I may still be in trouble (??)