开发者

Interpret raw image data from Android Camera onPictureTaken(byte[] data)

开发者 https://www.devze.com 2023-01-28 23:53 出处:网络
I\'m using the Camera class to take a picture and want to do some processing on the image inside onPict开发者_如何转开发ureTaken.How can I interpret the byte array?Is it in RGB format or something els

I'm using the Camera class to take a picture and want to do some processing on the image inside onPict开发者_如何转开发ureTaken. How can I interpret the byte array? Is it in RGB format or something else?


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.


mCamera.takePicture(null, null,mPictureCallbackRaw);

where mPictureCallbackRaw is the instance of Camera.PictureCallback

0

精彩评论

暂无评论...
验证码 换一张
取 消