Colorize bitmap dynamically
Hi
I have an image which is completely white, its shape is only defined by its alpha channel. What I'd like to do, is draw this image and dynamically change white to any color, while preserving its alpha channel. And it needs to be fast, as I'd like to animate color transitions. Does TouchGFX provide an optimized (ChromArt) way to draw something with a custom color applied?
As I haven't found anything so far, I came up with the following idea. I convert my source image to a dynamic bitmap in L8_ARGB8888 format: indices are alpha levels, and the palette is filled dynamically with the desired color, 1 alpha level per palette entry. This way, to adjust the color at runtime, I just need to write 256 pixels (the palette) instead of the whole bitmap.
This works fine but animated transitions are not smooth with a STM32F7. I definitely need a more optimized solution, can someone help me?
Thanks