Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Image Loading Issue - newbie needs some simple help

Author
Message
Jawa Juice
11
Years of Service
User Offline
Joined: 3rd Aug 2012
Location:
Posted: 4th Aug 2012 07:24
I am having trouble getting any images to register or load in a basic tutorial program. I put a .bmp in a folder right beside my saved program. In the folder, both the image and the program load separately, but when I check through my program, it claims the .bmp I am trying to load doesn't work and I get a blank screen when i try to load

I am very amateur at programming but have great aspirations for it, but this simple little set back is absolutely perplexing and very discouraging. I have looked at several similar problems on the message board but have failed to find a fix. If any one could help, I would be greatly appreciative, as it is hard for me to move on and learn more without fixing this basic problem first; which I am sure is just a new guy's mistake and easy to change.

Thanks for any help! I attached my program and the picture below.


Load image "bloke.bmp",1

paste image 1,100,100
if file exist("bloke.bmp") = 0
print "File does not exist"
else
print "File Exists"
endif
wait key
end

Attachments

Login to view attachments
Bernd
12
Years of Service
User Offline
Joined: 26th Jul 2011
Location:
Posted: 4th Aug 2012 11:25 Edited at: 4th Aug 2012 17:52
You should try something like this:

Kezzla
15
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 6th Aug 2012 05:46
welcome to the programming world!

don't stress out about all the little hurdles, everyone goes through them and the community here is very friendly and helpful.

I will suggest starting out by reading TDK's tutorials.

they are some of the best dbpro resources on the net.

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

good luck and have fun.

Sometimes I like to use words out of contents
Sickly
14
Years of Service
User Offline
Joined: 14th Jul 2009
Location: Does it matter?
Posted: 10th Aug 2012 08:51
You said you put the image in a folder next to the saved program. In your code it would need to know the folder name that the image is inside. I ran it without the image directory, and got an error. Put it in the same folder as the program and got file exists and a picture of a man. Not sure if thats what you are trying to do, but thats what I did to get the image to load. Hope this helps!
Neuro Fuzzy
16
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 13th Aug 2012 03:31
Make sure you have a .dbpro PROJECT file in the same folder as well, and that it's saved properly.

Basically, DBPro compiles to an executable. The image path is relative to the executable, so if you load the image "bloke.bmp", it expects the image to be in the same directory as the executable. If there is no project file, DBPro will put the executable in some temporary folder somewhere on the computer, and if the media isn't in that folder, it won't find it.

Login to post a reply

Server time is: 2024-04-20 09:42:34
Your offset time is: 2024-04-20 09:42:34