Images are only adresses

Discussion in 'Questions (Windows Mobile)' started by Put Claude, May 28, 2007.

  1. Put Claude

    Put Claude Active Member Licensed User

    Hi all,

    imagelist.item(3) = imagelist.item(4)
    imagelist.item(4) = imagelist.item(3)
    So, I think I only substitude the adres to design on, because the memory in list holds the same picture all the time, and do not copy memory from one place to another.
    Is this right?
    If so, wat is the most easy way to copy image-memory to another image-memory?

    Put Claude Belgium
     
  2. Cableguy

    Cableguy Expert Licensed User

    I would say You had to save as file using binary dll and then reload it, but then you're stick with the bitmap format...
    What exactly are you trying to do?
     
  3. Put Claude

    Put Claude Active Member Licensed User

    Cableguy,

    The files I loaded in the list stay on place in the list.
    If I use drawer.New2(imagelist.item(1),B4PObject(5))
    to draw on the image it is OK.
    bmp1.image=imagelist.item(1) 'bmp1 let see imagelist.item(1)
    drawer.New2(bmp1,B4PObject(5)) 'wil draw on bmp1,
    but in fact on imagelist.item(1)
    bmp2.image=imagelist.item(1) 'bmp2 let see imagelist.item(1)
    drawer.New2(bmp2,B4PObject(5)) 'wil draw on bmp2,
    but in fact on imagelist.item(1)
    If I look to bmp2, I see 2 designs, all on imagelist.item(1)
     
  4. Cableguy

    Cableguy Expert Licensed User

    If I understand you correctly, You get your imagelist item filled with bothe the original and the drawn image (?), i think this shouldn't be possible....

    If you want to make your image "persistant" you have to save it, not quite sure on how to do it...
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    When you get an image from an ImageList you get a reference to the image.
    This is useful to decrease the memory load and improve the performance.
    However, when you get an image from an ImageButton, Form or Image control a new copy will be returned.
     
  6. Put Claude

    Put Claude Active Member Licensed User

    Hi,
    I found out many things about graphics now, so I can work now with references and also copy images in memory, replace them, save them, transparency with them, etc... I am out of the problems FOR NOW... :)

    HAVE TO TELL AGAIN, HOW AMAZING THIS B4PPC IS: ones you understand a bit, it go fast... never screw up te editor or my programs, never going into the weeds with anything till now.. GREAT STUFF.

    Put Claude Belgium
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Thanks Put :)
     
Loading...