I'm currently having problems displaying camera images as thumbnails.
I use the following code when I am taking the camera photo...
String filename = timeStampFormat.format(new Date());
ContentValues values = new ContentValues();
values.put(Media.TITLE, filename);
values.put(Media.DESCRIPTION, "new Image");
values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg");
//insert file onto SD card
imageUri = getContentResolver().insert(Media.EXTERNAL_CONTENT_URI,
values);
camDemo = new ImageCaptureCallback( getContentResolver
().openOutputStream(imageUri));
This Image capture callback code is as follows...
public void onPictureTaken(byte[] data, Camera camera) {
try {
filoutputStream.write(data);
//pic.compress(Bitmap.CompressFormat.JPEG, 40,
filoutputStream);
filoutputStream.flush();
filoutputStream.close();
} catch(Exception ex) {
ex.printStackTrace();
}
}
When I try to display the full size image it works ok but when I try
to display as a thumbnail I get the following exception...
Uri uri = Uri.withAppendedPath
(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "72");
Can anyone help?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---