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 :)