Hi all,

I'm fighting a weird battle over here.

Using this simple code :


URL bitmapURL = new URL("http://farm5.static.flickr.com/
4069/4432443443_3ece4b42d9.jpg");
                                HttpURLConnection connection =
(HttpURLConnection)bitmapURL.openConnection();
                                connection.setDoInput(true);
                                connection.connect();
                                InputStream input = connection.getInputStream();
                                bitmapFromUrl = 
BitmapFactory.decodeStream(input);


I'm able to create a bitmap from the url of a jpg file. Well most of
the time.
The url included in the code is of a jpg that cannot be decoded by
bitmapfactory.

I narrowed it down to the fact that it uses an ICC color profile.
Which seems to me to be the only true difference from this other one
which loads fine :
http://farm2.static.flickr.com/1370/879345990_d778558446.jpg

I thought that icc color profile were headers and that decoders which
did not know what to do with it just ignore them. But it doesn't seem
to be the case for Android BitmapFactory.

Anyone has any idea how I could overcome this problem ?

Side note : If I feed the guilty url to a webview component, it
displays it fine with no problem. Could that be used in any way to
make a bitmap out of it ?

Thanks.

Yahel

-- 
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