开发者

Android: how to get bytes instead Image from Camera [duplicate]

开发者 https://www.devze.com 2023-03-05 18:40 出处:网络
This question already has answers here: converting Java bitmap to byte array (10 answers) 开发者_开发百科Closed 8 years ago.
This question already has answers here: converting Java bitmap to byte array (10 answers) 开发者_开发百科 Closed 8 years ago.

Is there is way to tell to:

Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE ); 

do not create images at all, but return data in [] bytes??


You may want to use startActivityForResult to get the image and the convert it yourself:

Get the image using the method in the accepted answer of this question: Android camera intent

and convert the resulting bitmap to a byte array as in this one: converting Java bitmap to byte array

0

精彩评论

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