First get the Bitmap of Image , copy to Byte array , get the Base 64 of the
byte by using codec.jar from apache


   1. ByteArrayOutputStream baos = new ByteArrayOutputStream();
   2. bm.compress(Bitmap.CompressFormat.PNG, 100, baos);
   //bm is the bitmap object
   3. byte[] b = baos.toByteArray();
   4. Base64.encode(b) () // return char[], which can covert to String




On Sun, Jan 30, 2011 at 12:51 AM, saex <[email protected]> wrote:

> thanks to all!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to