loading photos

Discussion in 'Questions (Windows Mobile)' started by derez, May 15, 2009.

  1. derez

    derez Expert Licensed User

    My MIO 350 does not want to load photos with size of 1 MB using basic4ppc programs, it complains about memory, but it agrees to do it when using other programs, for example RPHOTO.

    Why ?
     
  2. agraham

    agraham Expert Licensed User

    Not enough information to comment I'm afraid. What is the actual error message? Does it happen on the first photo. Are you trying to load more than one at conce? What are you loading them into, Bitmaps, Images ... ?

    You need to explain the sequence and objects involved. There is a memory leak problem with ImageLib and ImageLibEx Bitmaps in Basic4ppc version 6.50 and earlier that is fixed in version 6.75 and later. Actually this affects all library objects but is most damaging with Bitmaps because of their size.
     
  3. derez

    derez Expert Licensed User

    The problem is when I load a single photo to an imagelist with "add" or I want to draw it on a form with drawimage.
    The error is:
    "OutofMemoryException"
    I'm using 6.76 (it appeared in the previous versions as well).
     
  4. agraham

    agraham Expert Licensed User

    Is this the first image the application loads after starting in either of the cases you mention or have other images been loaded before? Can you post a simple app that fails for you?
     
  5. derez

    derez Expert Licensed User

    Here it is :)
    It is the first photo loaded, except for small buttons images.
    Help for the operation:
    The first button starts loading of one picture, the second is for the whole directory (then you can use the green arrows).
     
    Last edited: May 15, 2009
  6. derez

    derez Expert Licensed User

    I tried to replace the imagelist which I load the photo to, with a imagelib bitmap object, using new1.
    The result is the same.
     
  7. agraham

    agraham Expert Licensed User

    It fails on my iPAQ 214 as well with big photos. I assume that "size of 1MB" refers to the size of the jpg file. Assuming something like an 8Mpixel camera as the source for a file of this size this expands to something like 24MBytes. Your Mio has 64MBytes of memory so it looks like the picture size is just too big as ImageList loads the images into full size Bitmaps.

    I've tried to find the RPHOTO program you mentioned but I can only find desktop versions. :confused: However specialist photo programs for devices (and desktop apps like PhotoShop and PaintShop Pro) will use programming techniques that minimise the amount of memory being used, like only loading the part of the photo being displayed and they will be written in native code so they can control the use of memory directly, they won't just load the entire picture into a Windows Bitmap at full resolution. I am afraid that manipulating large photos will not be possible in Basic4ppc.
     
  8. derez

    derez Expert Licensed User

    Thanks Agraham.
    I attach the RPhoto.
     
  9. derez

    derez Expert Licensed User

    More on loading photos

    Agraham
    Processing what you wrote, the problem is not in the total memory but is a limitation on the size (or number of pixels) in one image.
    In my navigation program I use a imagelist with 9 maps in memory all the time, each the size of 1000 by 1000 pixels, and it works.
    If there is a way to split the image file to few pieces (horizontally or vertically, or both to create tiles) - I could have handled the reunion on the form...
    My knowledge on jpg files is too short to be able to do it.
    I'll appreciate if someone (!) will do it, I believe it may be of use to many members of this great forum.
    Thanks again.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice