How can I convert from NV21 to JPEG. Currently, NV21 is the only previewFormat that is supported by the camera on a Nexus One (running Android 2.2).
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is class to work with YUV images – YuvImage. And this class have method compressToJpeg.
But it only for android 2.2. In more popular 2.1 there is no such class.
So you need write code by yourself (for 2.1) to convert to rgb and than use Bitmap class.
But you lucky to have 2.2 (I’m stuck with official 2.1 on htc hero forever =((( )
Btw, thank to google for “powerful” API.