2

I am developing a android application in which I wanted to combine 2 bitmap images and create a new one.

the application I am developing is a greeting card. first image is transparent PNG with text with a cut off area. The other image is a photo user will take a photo from the phone.

I want to create a new image printing the greeting card on top of the users photo.

Can anyone provide some code sample to do this? I want to do this from code without using android controls.

Janaka
  • 2,505
  • 4
  • 33
  • 57

1 Answers1

1

Put the 2 images in a relative layout or framelayout. And you can use

relativeLayout.buildDrawingCache();
Bitmap bmp = relativeLayout.getDrawaingCache();
blessanm86
  • 31,439
  • 14
  • 68
  • 79
  • I wanted to do it from code programmatically. without using any controls – Janaka Nov 11 '11 at 12:00
  • refer this http://stackoverflow.com/questions/8064352/unable-to-get-the-bitmap-of-a-linearlayout-along-with-its-child-views/8064540#comment9897728_8064540. – blessanm86 Nov 12 '11 at 09:08