2022-06-16 02:16 AM
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:
but for PNG to extract the width and height by reading the header of the png file.
Then:
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
2022-06-16 10:32 AM
2022-06-16 10:49 PM
I have seen this, of course, but it is for opaque format and I need a transparent one such as PNG or ARGB8888.
2022-06-17 06:51 AM
Is for any bitmap object , only change type.
bmpId = Bitmap::dynamicBitmapCreate(100, 150, Bitmap::RGB565);