none
Graphicswindow.drawresizedimage error, file already exists RRS feed

  • General discussion

  •  GraphicsWindow.Height = 400
     GraphicsWindow.Width = 600



      Fairytailpic = "https://upload.wikimedia.org/wikipedia/commons/d/d5/Chess_Board.svg"  '168 x 300'

     GraphicsWindow.DrawResizedImage(Fairytailpic, 0,300, 610,100)

    i am getting this picture from the internet. 

    When i try to run this code i get this error. Never happened to me before.

    This is causing massive issues from the fairytail game that was already created before this error. Now i cant run the game because this error comes up.

      

    Matthew

    Tuesday, April 12, 2016 8:19 PM

All replies

  • Better use this link: 600px-Chess_Board.svg.png

    or any other size, but use a .png and HTTP  protocol (not https)

    from this site: https://commons.wikimedia.org/wiki/File:Chess_Board.svg


    Tuesday, April 12, 2016 9:17 PM
    Answerer
  • Right, getting files from my computer is not an issue, but why when i get files from the internet, does that program not work.

    Matthew

    Tuesday, April 12, 2016 9:30 PM
  • ... getting files from my computer ??

    This way should work, getting files from the internet:

    Fairytailpic="http://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Chess_Board.svg/600px-Chess_Board.svg.png"
    GraphicsWindow.DrawResizedImage(Fairytailpic, 0,300, 610,100)

    You cannot load a .SVG file with GraphicsWindow.DrawResizedImage or -.DrawImage, instead use a .png, jpg etc. image file type.

    Does'nt it work ??

    If not working though, maybe look in task manager if there's a previous instance running of the programm, ev.  as 'tmp....exe'.

    PS:

    SVG is a text based (xml) file, while .png is an image that can be loaded in GraphicsWindow

    To see the difference, you can:

    1.) Start empty notepad.exe - File - Open.. , enter

    http://upload.wikimedia.org/wikipedia/commons/d/d5/Chess_Board.svg

    under file name into the dialog box, then 'OK'.
    Wait some secs and see the xml Text.

    2. Do the same with

    http://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Chess_Board.svg/600px-Chess_Board.svg.png

    and see the binary content of the PNG: ‰PNG  header etc....

    Tuesday, April 12, 2016 10:09 PM
    Answerer
  • nope still didnt work. there isnt another instace because i only have one window opened of smallbasic.

    Matthew

    Tuesday, April 12, 2016 11:42 PM
  • Hi Mat !

    try this little code and  tell me if you see 4 chessboards image ? program : VVS441

    here is the listing:

    ________________________________________________________________________________________

    GraphicsWindow.top= 0
    GraphicsWindow.left= 0
    GraphicsWindow.Height = 700
    GraphicsWindow.Width = 700

    image1=ImageList.LoadImage("https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/AAA_SVG_Chessboard_and_chess_pieces_03.svg/500px-AAA_SVG_Chessboard_and_chess_pieces_03.svg.png")

    GraphicsWindow.DrawresizedImage(image1, 0, 0,250,250)

    image2=ImageList.LoadImage("https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Sjakkspillet.jpg/240px-Sjakkspillet.jpg")
    GraphicsWindow.DrawresizedImage(image2,400,0, 250,250)

    image3=ImageList.LoadImage("https://openclipart.org/image/800px/svg_to_png/18581/portablejim-2D-Chess-set-Chessboard-1.png")
    GraphicsWindow.DrawresizedImage(image3,0,400, 250,250)

    image4=ImageList.LoadImage("http://www.clipartsfree.net/vector/small/chessboard-diagonal-cuts-plain_Clipart_Free.png")
    GraphicsWindow.DrawresizedImage(image4,400,400, 250,250)

    Wednesday, April 13, 2016 12:43 AM
    Answerer
  • no i do not. i still get the same error.

    Matthew

    Wednesday, April 13, 2016 1:47 AM
  • Try cleaning temp : using disk cleanup tool or just deleting all files from %temp%.
    Wednesday, April 13, 2016 10:39 AM
    Moderator
  • where would i find thatfile?

    Matthew

    Wednesday, April 13, 2016 3:17 PM
  • C:Users/XXXX/appdata/local/temp ? and delete all the stuff in there?

    Matthew

    Wednesday, April 13, 2016 3:22 PM
  • Yes - close all open apps first - don't worry about a few items that won't delete.

    If unsure, then use disk cleanup  tool.

    Small Basic and other programs can leave orphaned files in temp and eventually run pout of available names - I clean my %temp% every time I boot.

    Wednesday, April 13, 2016 3:32 PM
    Moderator
  • there are like 30,000 files in there. is that the right folder?

    Matthew

    Wednesday, April 13, 2016 4:07 PM
  • ok it worked. thanks so much,

    Matthew

    Wednesday, April 13, 2016 4:16 PM