The only difference I can see would be meaningful if BitmapFactory sometimes couldn't decode from a socket stream.

There is something about something like that (sorry, can't be more specific) here:

http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html

Perhaps it's been fixed, you can check the bug database:

http://code.google.com/p/android/issues/list

-- Kostya

04.02.2011 12:24, Yahel пишет:
A little up on this. No one really ?

Yahel

On 3 fév, 19:49, Yahel<kaye...@gmail.com>  wrote:
Hi all,

I'm starting to implement a lazy image loader for the listview in my
new project so I was gathering informations and came across Romain Guy
full featured implementation in the project Android Shelves 
:http://code.google.com/p/shelves/source/browse/trunk/Shelves/src/org/...

While reading I found this piece of code I cannot understand
(FLAG_DECODE_BITMAP_WITH_SKIA is set to false above in the code) :

                     if (FLAG_DECODE_BITMAP_WITH_SKIA) {
                         expiring.bitmap =
BitmapFactory.decodeStream(in);
                     } else {
                         final ByteArrayOutputStream dataStream = new
ByteArrayOutputStream();
                         out = new BufferedOutputStream(dataStream,
IOUtilities.IO_BUFFER_SIZE);
                         IOUtilities.copy(in, out);
                         out.flush();

                         final byte[] data = dataStream.toByteArray();
                         expiring.bitmap =
BitmapFactory.decodeByteArray(data, 0, data.length);
                     }

I think SKIA is the Image library written by google, at least used by
google.

What I don't get is why is he doing a test here and what is the
difference between the two types of loading ? They both are decoded by
BitmapFactory. Why would the result be different ?

Any insight ?


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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