linkmaster_6 wrote:Code works fine for me. Btw what do you think would be a good way to cache the image in case the user doesnt have itnernet access
Hi friends,
I could not able to load the .jpg images (300 * 300).
When I saw a log, it states that:
I/global ( 1220): Apr 2, 2009 6:13:08 PM java.io.BufferedInputStream <init>
I/global ( 1220): INFO: Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if a 8k buffer is required.
D/skia ( 1220): xxxxxxxxxxxxxx failure to skip request 5176 actual 1736
D/skia ( 1220): xxxxxxxxxxx jpeg error 91 Miscellaneous marker 0x%02x, length %u
The code which I have written is:
URL aURL = new URL(fotoUrl);
URLConnection conn = aURL.openConnection();
conn.connect();
InputStream is = conn.getInputStream();
///* Buffered is always good for a performance plus.
BufferedInputStream bis = new BufferedInputStream(is,512*1024);
//BufferedInputStream bis = new BufferedInputStream(is);
///* Decode url-data to a bitmap.
Bitmap b = BitmapFactory.decodeStream(bis);
Can any one please help me.