locked
Problem with background image RRS feed

  • Question

  • Hey! :D

    I have a problem with my background image. It will never load up. :/

    This is my code with the internet:

      'Grundeinstellungen
    GraphicsWindow.Title = "NoobHelper 0.2"
    GraphicsWindow.Height = 768
    GraphicsWindow.Width = 1024
    GraphicsWindow.BackgroundColor = "White"
    GraphicsWindow.CanResize = "True"
    ImageList.LoadImage("http://fc04.deviantart.net/fs70/f/2010/071/2/5/Mount_and_Blade_by_SaturnoArg.jpg")
    ImageList.GetHeightOfImage("Mount_and_Blade_by_SaturnoArg.jpg")
    ImageList.GetWidthOfImage("Mount_and_Blade_by_SaturnoArg.jpg")
    GraphicsWindow.DrawImage("Mount_and_Blade_by_SaturnoArg.jpg", 768, 1024)

    And here is the same with the image on my computer.

      'Grundeinstellungen
    GraphicsWindow.Title = "NoobHelper 0.2"
    GraphicsWindow.Height = 768
    GraphicsWindow.Width = 1024
    GraphicsWindow.BackgroundColor = "White"
    GraphicsWindow.CanResize = "True"
    ImageList.LoadImage("Hintergrund M&B.jpg")
    ImageList.GetHeightOfImage("Hintergrund M&B.jpg")
    ImageList.GetWidthOfImage("Hintergrund M&B.jpg")
    GraphicsWindow.DrawImage("C:\Users\Timo\Desktop\NoobHelper\0.2\Bilder\Hintergrund M&B.jpg", 768, 1024)

    I edited the name of the file on my Pc. How can I fix this?

    Greetings

    Timo


    Ich bin Neu


    • Edited by Timo Sö Wednesday, September 5, 2012 4:53 PM
    Wednesday, September 5, 2012 4:52 PM

Answers

  • when you use imagelist you need tore store the result in a variable and it is this variable that is the argument of imagelist functions.

    Imagelist is used to do the download only once, using the net filename will also work, but be downloaded each time.

    The plot diddn't happen because you positioned it outside the GW.

    GraphicsWindow.Title = "NoobHelper 0.2"
    GraphicsWindow.Height = 768
    GraphicsWindow.Width = 1024
    GraphicsWindow.BackgroundColor = "White"
    GraphicsWindow.CanResize = "True"
    img = ImageList.LoadImage("http://fc04.deviantart.net/fs70/f/2010/071/2/5/Mount_and_Blade_by_SaturnoArg.jpg")
    h = ImageList.GetHeightOfImage(img)
    w = ImageList.GetWidthOfImage(img)
    GraphicsWindow.DrawImage(img, 0, 0) ' the coords are the top left of the image

    • Edited by litdev Wednesday, September 5, 2012 5:50 PM
    • Marked as answer by Timo Sö Wednesday, September 5, 2012 6:32 PM
    Wednesday, September 5, 2012 5:49 PM

All replies

  • when you use imagelist you need tore store the result in a variable and it is this variable that is the argument of imagelist functions.

    Imagelist is used to do the download only once, using the net filename will also work, but be downloaded each time.

    The plot diddn't happen because you positioned it outside the GW.

    GraphicsWindow.Title = "NoobHelper 0.2"
    GraphicsWindow.Height = 768
    GraphicsWindow.Width = 1024
    GraphicsWindow.BackgroundColor = "White"
    GraphicsWindow.CanResize = "True"
    img = ImageList.LoadImage("http://fc04.deviantart.net/fs70/f/2010/071/2/5/Mount_and_Blade_by_SaturnoArg.jpg")
    h = ImageList.GetHeightOfImage(img)
    w = ImageList.GetWidthOfImage(img)
    GraphicsWindow.DrawImage(img, 0, 0) ' the coords are the top left of the image

    • Edited by litdev Wednesday, September 5, 2012 5:50 PM
    • Marked as answer by Timo Sö Wednesday, September 5, 2012 6:32 PM
    Wednesday, September 5, 2012 5:49 PM
  • Thank you really much! I don't know, that I have to save this in a variable. But now if I read it, sounds it logic.


    Ich bin Neu

    Wednesday, September 5, 2012 6:32 PM