If you follow my example you can add the colors by adding the
components and then recombining them into a color int.
int r = Color.red(bitmap1) + Color.red(bitmap2);
int g = Color.green(bitmap1) + Color.green(bitmap2);
int b = Color.blue(bitmap1) + Color.blue(bitmap2);
int newPixel = Color.argb(
Thanks for all replies.. By merge I mean adding, one image with
another.
Nithin
On Mar 16, 6:28 pm, Warren wrote:
> I use something like the following function. It really depends what
> you mean by "merge". Do you mean average, alpha over, multiply, add,
> etc.?
> Anyway, you can change the ari
I use something like the following function. It really depends what
you mean by "merge". Do you mean average, alpha over, multiply, add,
etc.?
Anyway, you can change the arithmetic here to suit your needs. The
important parts are that you copy the bitmap you wish to change so
that you have a mutabl
I am a new one in UI coding. So may be my way is not the best..
Panit mPaint = new Paint();
mPaint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
mPaint.setAlpha(XX);
notice that Mode.DST_IN is important(Better to see it's api-doc.)
Use this paint to draw a "ALPHA_8" bitmap on your org bitmap
How about set the Alpha channel in each one to 50% so they are both
half see through?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, s
5 matches
Mail list logo