Old post, but it talks about a similar problem that I have, so I could also answer the part that I know :)
You are probably mistaken. I suggest you use a JPEG callback to save the image:
mCamera.takePicture(null, null, callbackJPEG);
Thus, you will receive JPEG data in a program that you can save to a file without changes:
final Camera.PictureCallback mCall = new Camera.PictureCallback() { @Override public void onPictureTaken(byte[] data, Camera camera) {
As for the black image, I found that placing a simple Thread.sleep(250) between camera.startPreview() and camera.takePicture() will take care of this particular problem on my Galaxy Nexus. I don’t know why this delay is needed. Even if I add camera.setOneShotPreviewCallback() and call camera.takePicture() from the callback, the image goes black unless I delay the first delay ... Oh, and the delay is not just a “some” delay. This should be a fairly long meaning. For example, 250ms sometimes works, sometimes not on my phone.
source share