It does seem to decode the string into bytes(ie: not null), but the image that is made from thos bytes by the bitmapfactory is null. --

You need to confirm that the decoded bytes at the client end match the original bytes at the server end. Can you manually download the image in question and look at its byte contents with a hex editor or something, and dump out the contents of the image bytes as you receive them at the client from the call to Base64.decode() as hex byte strings to LogCat or similar so you can do an ASCII / byte comparison? Not an easy thing to do, but if it's working up until that point you need to confirm the bytes are the same. If the image header has been corrupted, lost or has had an extra bit tacked onto the front for some strange reason then that could explain the failure at the BitmapFactory point.

Can you confirm you are not accidentally leaving any <CR><LF> pairs in the string when decoding to bytes? Not sure if they would come from simply streaming the data back via HTTP (wouldn't expect it) but couldn't hurt to check.


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

Reply via email to