Hi! I'm new to this forum (well, have been lurking for a while and learned a lot familiarizing myself with android development, but this is my first post).
The problem I've run into is that I've got two bitmaps I need to blend between, whilst preserving the alpha channel in the output. Basically I need to be able to fade between the two images based on the input to a slider control from the user.
My original idea was to have a LayerDrawable containing two BitmapDrawables (one for each image) and simply setting the Alpha of the upper drawable to the value of the slider. The problem with this approach is that both bitmaps have an alpha channel (with some transparency, but identical for both pictures), which means that even when the output should have faded all the way to the upper bitmap you will see the lower one "through it".
Is there any fast way to interpolate only the color channels of my two bitmaps, leaving the alpha channel intact? I could iterate through all the pixels and perform the blending manually to create a third output Bitmap in the OnDraw method of my custom View, but I suspect that would be very slow.
/ Andreas Mattsson