Image from disc

Discussion in 'Questions (Windows Mobile)' started by wolfgang, Feb 14, 2008.

  1. wolfgang

    wolfgang Member Licensed User

    Hi,
    is it possible to display only a part of an image which is stored on disk and not loaded to memory? Or much easier, this code should work:
    Code:
    .
    .
    .
    drawer.DrawImage1(
    "myimage",rectSrc.Value,rectDest.Value,false' -> error message
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Your code should work. You should change it to:
    drawer.DrawImage1(AppPath & "\myimage",...)
    External libraries do not use the default folder.

    It will however first load the image to memory.
     
  3. wolfgang

    wolfgang Member Licensed User

    Hi Erel,
    this is the code and the error message
    Code:
    Sub Globals
       
    'Declare the global variables here.
    End Sub

    Sub App_Start
       Form1.Show
       draw.New1(
    "Form1",false)
       rsrc.New1(
    100,100,238,268)
       rdst.New1(
    0,0,238,268)
       draw.DrawImage1(AppPath & 
    "\stein50.bmp",rsrc.Value,rdst.Value,false)
       Form1.Refresh
    End Sub
    The image exits, 100%.

    Error description:
    "Value may not be ZERO"
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    :signOops:
    Drawer.DrawImage1 expects a loaded image.
    You should add a bitmap object and use it to first load the image:
    Code:
    bitmap.New1(AppPath & "\yourfile.bmp")
    draw.DrawImage1(
    bitmap.Value,rsrc.Value,rdst.Value,false)
     
  5. wolfgang

    wolfgang Member Licensed User

    Hi Erel,
    thank you. That’s what I did up to now. But I was looking for a possibility to display a small part of a big (20 MB) image(map) on ppc to save memory. So I have to think about of an “automatic” map changing?!
     
Loading...