I read about this in several forum questions. But always, people end up using the method "Bitmap createScaledBitmap (Bitmap src, int dstWidth, int dstHeight, boolean filter)", but I can not apply this method because, when dealing with large images, it fails with a message of outofmemory.
I want to know how I can resize a large image already taken. I've readed the android developer section of large bitmaps but I haven't been able to implement it.
I'm using the next code to capture a photo.
public void openTakePicture() {
String date = new SimpleDateFormat("dd-MM-yyyy_HH-mm-ss").format(new Date());
photoname = "pic_" + date + ".jpg";
// Create an output file.
file = new File(Environment.getExternalStorageDirectory(), photoname);
outputFileUri = Uri.fromFile(file);
// Generate the Intent.
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
// Launch the camera app.
startActivityForResult(intent, TAKE_PICTURE);
}
Thanks for your comments