Reputation: 10376
I call takePicture
with a callback for the jpeg event: camera.takePicture(null, null, this);
Here is the callback handler:
@Override
public void onPictureTaken(final byte[] data, Camera camera) {
Bitmap picture = BitmapFactory.decodeByteArray(data, 0, data.length);
MediaStore.Images.Media.insertImage(getContentResolver(), picture, "name" , "description");
}
In testing, I'm finding that the image is always mirrored about the y-axis. Does anyone know (1) whether this happens on for all devices, and (2) why? I really don't understand why the byte data doesn't represent what I see in the camera preview. Is that an unreasonable expection?
Upvotes: 5
Views: 1777