I've an app that takes a picture. It creates 2 subset bitmaps, processes these bitmaps with a distortion, then places the subsets over the original as overlays. Is there a way to save all three bitmaps as one (as it appears on the phone's screen)? I'd like to save what the user sees on the screen as a fourth bitmap on the sdcard? I've a feeling I've done this wrong.
Thanks
[update1]
@Override
public void onDraw(Canvas canvas){
super.onDraw(canvas);
Log.e(TAG, "******about to draw bgr ");
canvas.drawBitmap(bgr, 0, 0, null);
if (isLocked == true && bothCirclesInPlace == true){
if(overLay != null)
canvas.drawBitmap(overLay, centreX-radius, centreY-radius, null);
if(overLay2 != null)
canvas.drawBitmap(overLay2, centreA-radius, centreB-radius, null);
}
You can try the following. If you can, draw the images to a canvas:
Yes it is possible to overlay multiple bitmaps and save as a single image file (PNG / JPEG / ..).
One way is to use Canvas class. Canvas along with Paint class defines the way in which bitmaps are overlayed.
Following code will demonstrate multiple bitmap overlay into a single image file.
Shash
You can use Bitma.compress(..) with FileOutputStream as last argument.
Read about external storage for instructions on how to write to sd-card.