How to save images after they have been placed in an imagelist

Discussion in 'Questions (Windows Mobile)' started by XerVision, Jul 11, 2007.

  1. XerVision

    XerVision Member Licensed User

    I have an imagelist of 3 images that I need to embed into a file.
    Is there a way to embed the list
    Or do I need to output them first and then embed?
    I have tried different methods.
    My codes looks a little like this:

    Sub BuildDefImg
    'Takes in the ImgList and Builds
    'EMBED IMAGES
    'USes same name as the table
    ImgListSize=XVPIMGLi.Count
    if ImgListSize>0 then
    IMGBat=DefTableName.Text&".xmg"
    FileOpen(d1,IMGBat,cRandom)
    Ximg.New1(d1,true)

    'EMBED FILES FROM LIST
    for i = 0 to ImgListSize-1 Step +1
    DEFTABIMG.Image=XVPIMGLi.Item(i)
    Ximg.EmbedFile(DEFTABIMG.Image)
    next
    FileClose(d1)
    'Place the size in the table

    MsgBox(FileNum & " Embedded")
    end if
    End Sub


    The Process I would like to implement:
    User Selects Image File
    File Added to ImageList
    (n Repeats as many times as needed)

    User saves- which
    Takes Imagelist and Embeds them into one file.

    Note: Names are not important since the user just retrieve images into an
    imagelist for use.


    I hope that the above makes sense to someon. I have tried so many methods as
    1.Embedding the Imagelist Items
    2.Loading each image into an Control.Image and then embeding
    it.

    Also I do not have a copy of the ImageLibrary .dll on my laptop- how can I get that.
    :sign0085:
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can download the ImageLib from here: www.basic4ppc.com/Downloads.html
    I recommend you to add an ArrayList and each time the user adds an image to the ImageList add the file name to the ArrayList.
    Now when you want to save an image from the ImageList you will be able to use the file name with EmbedFile.
     
  3. XerVision

    XerVision Member Licensed User

    Thanks

    Thanks,Erel.
    It works perfectly.
    Use the Arraylist:sign0161:
    I have should have known that.


    Thanks again for all the great support you provide.
     
Loading...