android - Overlaying bitmap over another bitmap -


if have 2 bitmaps (b1 , b2). how can generate 3rd bitmap (b3) result of b2 drawn on b1? if can modify b1 drawing b2 on think better (for memory).

thank you

you create bitmap backed canvas

canvas canvas = new canvas(bitmap1); canvas.drawbitmap(bitmap2); 

that overwrite bitmap 1. if want avoid that, create new bitmap first , pass constructor of canvas, draw bitmap 1 , 2 it.


Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -