I'm wanting to create a red cockpit night light effect as in the image below which I did in Corel Draw. Since my compass app GUI has a lot of elements, I thought it best to try and let android draw the layout, then I need to capture the composited bitmap somehow, then apply a tint to it, then display it until android redraws the next frame, and then repeat the process. Rather than creating an entirely new set of graphics just for the red night light effect. What if I wanted a green tint or amber, I want to be able to simply change the tint color and then the result is immediate without having to create a new set of graphics for each color which would bloat my app. I also understand that this has to happen at about 30 ~ 60 fps, so its got to happen really fast.
Does anyone have any ideas of how this might be accomplished?
Edit: Ok. So after listening to the replies. I have realized a fairly simple solution which I should have thought of in the first place, but anyhow, that is to apply the selected tint through image processing to each bitmap during Activity_Create when the bitmaps are loaded from file into memory. Then it only has to be done once and not for each rendered frame. If the user changes the tint color one only really needs to reload the main activity and process the bitmaps with the new tint color.
I know that there are image processing libraries available in B4A like:
Image Processing (for Bitmaps by Jim Brown)
RSImage Processing Library
Accelerated Surface
That would help me to do the color tinting, but I first need to capture a full screen rendered layout as a bitmap. How do I do that?
Does anyone have any ideas of how this might be accomplished?
Edit: Ok. So after listening to the replies. I have realized a fairly simple solution which I should have thought of in the first place, but anyhow, that is to apply the selected tint through image processing to each bitmap during Activity_Create when the bitmaps are loaded from file into memory. Then it only has to be done once and not for each rendered frame. If the user changes the tint color one only really needs to reload the main activity and process the bitmaps with the new tint color.
I know that there are image processing libraries available in B4A like:
Image Processing (for Bitmaps by Jim Brown)
RSImage Processing Library
Accelerated Surface
That would help me to do the color tinting, but I first need to capture a full screen rendered layout as a bitmap. How do I do that?
Last edited: