merged file not the same size as camera

All your problems with Audio, Video and Images.

merged file not the same size as camera

Postby izeko » Mon Oct 11, 2010 11:53 pm


What i am trying to do is display a overlay picture on the camera preview. This works ok and the size is fine, but when i merge the camera and the overlay the overlay picture is too small. Is there a way to make a bitmap larger.


Does anyone have any ideas to merge the camera and a overlay image.

This is my code for merging the 2 files
combineImages(Bitmap c, Bitmap s, String loc) {
Bitmap x = null;
x = Bitmap.createBitmap(s.getWidth(), s.getHeight(), s.getConfig());
Canvas canvas = new Canvas(x);
canvas.drawBitmap(s, new Matrix(), null);
//canvas.drawBitmap(resizedBitmap, new Matrix(), null);
canvas.drawBitmap(c, new Matrix(), null);

String tmpImg = String.valueOf(System.currentTimeMillis()) + ".png";

OutputStream os = null;
try {
os = new FileOutputStream(loc + tmpImg);
x.compress(CompressFormat.PNG, 100, os);
} catch(IOException e) {
Log.e("combineImages", "problem combining images", e);


I hope someone can help or point me in the right direction.

Posts: 9
Joined: Mon Oct 11, 2010 11:46 pm


Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 3 guests