Load PNG or ARGB8888 from a file to TouchGFX
Hello,
I would like to know if it is possible to load a transparent format such as PNG or ARGB8888 from a file to TouchGFX from code?
I have achieved to do this with BMP with the documentation but I need PNG.
If I use a library such as libspng to decode the png file to rgba8888, i would need to flip bits to argb8888 right?
From my understanding, this are the functions that I would need to translate to make it works:
- BMPFileLoader::getBMP24Dimensions(&MyFile, width, height);
but for PNG to extract the width and height by reading the header of the png file.
Then:
- BMPFileLoader::readBMP24File(Bitmap(bmpId), &MyFile);
For this function, I have no idea how to process.
Another option would be to load a ARGB8888 so the MCU wouldn't need to decode the PNG but still I would need to create a readARGB8888File() function that translate a ARGB8888 file to a Bitmap object of TouchGFX that I have no idea how to do.
Best regards,
skham