views:

373

answers:

1

Hi everyone,

I just don't get it: when I use the camera with an intent and also specify an output file, the returned image is always very small on many devices (e.g. Motorola Milestone 2.1, HTC Desire 2.1, Emulator 2.1, Emulator 2.0.1) but not on all (e.g. Nexus One). Here's what I do to bring up the camera app:

private final static String TEMP_PHOTO_FILE = Environment.getExternalStorageDirectory() + "/TEMP_PHOTO.JPG";  
private final static int REQUEST_CAMERA = 0;  
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);  
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(TEMP_PHOTO_FILE)));  
startActivityForResult(intent, REQUEST_CAMERA);

After the image has been taken I grab its outcome in onActivityResult(int requestCode, int resultCode, Intent data):

if (requestCode == REQUEST_CAMERA && resultCode == RESULT_OK) {  
    String photo = MediaHandler.moveFile(TEMP_PHOTO_FILE, MediaHandler.SDCARD_IMAGE_PATH, System.currentTimeMillis());  
    BitmapFactory.Options bitmapOptions = new BitmapFactory.Options();  
    // bitmapOptions.inSampleSize = 6;  
    imgBitmap = BitmapFactory.decodeFile(photo, bitmapOptions);  

The bitmap is pretty small and I am wondering why this happens. I know that it used to work properly.
Does anyone have the same issue or even a hint on how to fix this?

Thanks,
Steff

A: 

seems to be a "higher" problem: http://code.google.com/p/android/issues/detail?id=1480#makechanges

steff