Re: [android-developers] Bitmap to Bytes then bytes to Bitmap

2010-09-27 Thread Kostya Vasilyev
(wrong button) Base64 encoding if the data is going to be sent over HTTP. With a matching code in the download part to do base64 decoding. Preferably not putting the entire data in a string variable so as not cause too much garbage collection. -- Kostya Vasilyev -- http://kmansoft.wordpress.com

Re: [android-developers] Bitmap to Bytes then bytes to Bitmap

2010-09-27 Thread Kostya Vasilyev
In the "saving" part, calling byteArray.toString() does not return the contents of the array, but rather something like "byt...@0x12345678" (not quite, but this is close enough). What you need to be doing instead, is using the buffer's contents. Probably doing base64 encoding if it's supposed to b

Re: [android-developers] Bitmap to Bytes then bytes to Bitmap

2010-09-27 Thread Stephen Jungels
The decode byte array call expects JPEG compressed data. You should be consistent about either using unpacked bytes, as in your save operation, or packed bytes, as in your read operation. --SJ On Mon, Sep 27, 2010 at 6:38 AM, Jey wrote: > Hi all, > >       Am trying to store all images in my se

[android-developers] Bitmap to Bytes then bytes to Bitmap

2010-09-27 Thread Jey
Hi all, Am trying to store all images in my server, then i need to show based on requirements, i am able to store and restore bitmap bytes but i cant recreate the bitmap using stored bytes , pls find my code below and suggest me a solution if i doing wrong Converting Bitmap to Bytes