问题
I'm using the Camera class to take a picture and want to do some processing on the image inside onPictureTaken. How can I interpret the byte array? Is it in RGB format or something else? Thanks.
回答1:
references say it depends on Camera.Parameters (Camera.Parameters), and in this post (Re: FileOutPutstream code from onPictureTaken) they say that you must use the jpeg callback, so i guess it's jpeg.
回答2:
One more solution
mCamera.takePicture(null, null,mPictureCallbackRaw);
where mPictureCallbackRaw
is the instance of Camera.PictureCallback
I hope this will also work for you as it worked for me :)
来源:https://stackoverflow.com/questions/4351306/interpret-raw-image-data-from-android-camera-onpicturetakenbyte-data