Can you check the return value of: is.read(bitmapData2);
There is no guarantee that you will get all the bytes in one call to read, even with the buffer. As a quick fix try this: (new DataInputStream(is)).readFully(bitmapData2) If that works, I still would recommend writing your own readFully() method to avoid the extra object allocation. On Feb 17, 9:19 am, Mike Hearn <[email protected]> wrote: > Is the PNG truncated or are the bytes there, but wrong? > > > conn.setChunkedStreamingMode(4096); > > What is the purpose of this? > > > Actually it always works in the emulator, and it usually works when > > attaching the debugger to the phone and stepping through the code. > > Interestingly it almost always produces corrupt images when running in > > 'normal mode' - read on the Dev1 via UMTS. > > That sux. Does it also happen via WiFi? I am wondering if you could > sniff the packets and find out what the phone is actually receiving > from the network (not that I know how to do this ...) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

