5 Replies Latest reply on May 21, 2007 1:23 AM by Yann Martel

    Handling images

    Yann Martel Level 1
      Hello everybody.

      I am working on an application that displays many pictures.
      This application:
      - reads an xml file that contains the path to each jpg file (there are about 1000 files)
      - loads each of them using a loader
      - gets the bitmap content and resizes it to 120*90px using a matrix
      - unloads each loader
      -displays the bitmaps

      I have a few questions in relation with it:
      What's the difference between the Image, Loader and SWFLoader classes ? Should I be using Image instead of Loader ?

      At the end, this app should use about 45 MBytes (which is (number of pictures)*120*90*4bytes). When I test it, it actually uses 135Mb (after all the loaders have done unload() and garbage collector has been called). I wonder where the extra 90Mb come from.
      I did the same experience using empty (white) bitmaps and it uses 45 MB. So I guess the 90MB come from the jpg files which are probably still in the memory but I'd like to understand how I could get rid of them (if it is possible...).


      I'm not sure my english is really correct and I probably wasn't really clear in my explanation, anyway, if anyone has answers, I'd be glad to hear them.
      Thanks.