Tuesday, July 31, 2012

[android-developers] Re: Merge two bitmaps

Maybe change your canvas constructor to this?

Canvas c = new Canvas (cameraBitmap);

Then, draw foreground on canvas.


On Tuesday, July 31, 2012 7:57:47 AM UTC-5, Numair Qadir wrote:
I want to merge two bitmaps, here is my code

    / / Camera arg conversion to Bitmap
    Bitmap cameraBitmap = BitmapFactory.decodeByteArray (arg0, 0,
    arg0.length);
   
    / / FrameLayout to Bitmap
    FrameLayout mainLayout = (FrameLayout) findViewById (R.id.frame);
    Foreground = Bitmap.createBitmap Bitmap (mainLayout.getWidth (),
    mainLayout.getHeight (), Bitmap.Config.ARGB_8888);
    
    Canvas c = new Canvas (foreground);
    mainLayout.draw (c);

Should Become The camera image background, and foreground as top image. I've tried from 

--
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, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment