07-09-2010 11:38 AM
anyway to speed up the loading of bitmap eg: jpg file from SD card?
I noted the Media app can load the pic really quick. i'm using the following code.
byte data = new byte[available]; input.read(data, 0, available); EncodedImage image = EncodedImage.createEncodedImage(data,0,data.length
07-09-2010 11:46 AM
I know of no faster way.
I am concerned about your use of available. Use filesize in preference to <stream>.available(), as available() does not guarantee to give you the entire file and typically gives you 0.
07-09-2010 06:59 PM
They use cached images, they're smaller and since they are all kept in one file so they just need one thread and can simply load in the data and convert it to a bunch of Bitmaps.
07-09-2010 08:59 PM
IF you ever open the media app right after loading some pictures to it from your pc, you will see it say scanning. This is when it is loading the images to the BB.dat file that resides in most if not all folders with images. There was another thread on here where a user wrote code to parse this file and get the thumbnail images, but I'm not sure what thread it was.
07-09-2010 09:47 PM
Here's the link you were looking for: