This should work but it doesn't !
Blitz3D Forums/Blitz3D Beginners Area/This should work but it doesn't !
| ||
Every time I run this it starts and auto exit if I try windowed it makes a window error. but If I dont use any Image it works fine even tryed to use Global ship before the load... nothing works this must be a bug! Graphics 800,600,32 SetBuffer BackBuffer() Cls ship=LoadImage("img/ship3.jpg") Text 0,10, "This is some text printed on the graphic screen (and a white box)! Press ESC ..." Rect 100,100,200,200,1 DrawImage ship,50,50 Flip WaitKey() End let me guess Blitz cant use gif file? there should really be an option to delete our own post |
| ||
paths for files on your hard drive should be for example img\ship3.jpg not img/ship3.jpg... / is for network paths good luck :) |
| ||
what I always do with things that I load (images, files etc.) is check whether the adres is zero or not. like this: i=loadimage("c:\crap\mess.bmp") if not i notify "image not found" end endif |
| ||
nothing works this must be a bug! You've been using BlitzPlus for three days. Don't you think it's a bit premature to be assuming that? And don't you think someone would have noticed by now if loading images didn't work? If it isn't working, you have either the path or the filename wrong. \ and / might be the problem or it might be that you haven't saved the program to disk, and so it doesn't know the base directory. |
| ||
yea... |
| ||
I also suggest to read the entire post not just a part of it >.> at first I had it in the same place as the .bb so it was like "ship3.gif" but gif dont work! |
| ||
in the code above you have a / instead of a \ and you have ship.jpg, so if your image is a gif you've given the wrong extension, but then again i might know what im on about. |
| ||
Yep! Your using a / instead of a backslash \. Make sure the image exists and that you are using the correct filename for it. Typos are eeevil. I'm using Blitz+ and have no problems loading images, so its definatley not a bug. |
| ||
Also...Im a little confused... ship=LoadImage("img/ship3.jpg") ... let me guess Blitz cant use gif file? Are you using a .gif or a .jpg??? Blitz supports .gif aznimations, but plays them as movies (qv PlawMovie) Check your image file extensions! |