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 / [DBPro] Simple one this - 'Load Bitmap' problem.

Author
Message
Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 17th Aug 2006 15:46
Wotcha, folks.

For the life of me, I can't figure out this problem.

In my directory, projects, I have the following source code saved. I also have a 100x100 24bit bitmap called ball.bmp saved there as well.



Why is it returning the error message 'Runtime error 1003 - Could not load bitmap at line 3' ?

I'm using DBPro version 1.06.

...I'm not even trying to display the thing yet!

Any pointers, much appreciated.

Ta,

Tobo

Attachments

Login to view attachments
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 17th Aug 2006 16:05
Runs ok for me. Code looks perfectly ok.

Are you sure you need to use bitmaps. It is more usual to just use LOAD IMAGE instead. You only really need bitmaps if you are using the specialised bitmap commands like blur, etc.

Still doesn't explain your crash though, unless your graphics card is a bit pants. What one is it?

Boo!
Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 17th Aug 2006 16:39
From memory, it's an ATI X1300, 256mb

The weird thing is, this load bitmap problem has existed through an entire reformat & windows install, and a new graphics card!

I'm back at work now, but will try load image when I get back home.

Any other ideas why my original didn't work? I hate not knowing stuff that should work.

Many thanks.

Tobo.
Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 17th Aug 2006 20:22
I don't understand it.

Now I've tried load image, I get the following error message: 'Runtime Error 506 - Could not load image at line 4' !



What am i doing wrong? My grpahics card is fine - latest drivers, 3DMark runs okay!

Please?
Zergei
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 17th Aug 2006 20:27
The only thing that comes to mind is, if the image is in the same folder as the code, if it still bugs, try inputting all the directory, such as "c:\dbpro\bitmaps\ball.bmp". Also, make sure the image is not corrupted, i once had the same problem but with a texture, and it was that in my last modification it got corrupted, and i had to redo it.

Further on my stuff at...
Tobo
19
Years of Service
User Offline
Joined: 12th May 2005
Location:
Posted: 17th Aug 2006 20:32
Hmm - may have sorted it.

When I tried it again from scratch, this time creating a new project, it seemed to work. However, if I simply create and save source code in the same directory as the image, it throws up the above errors.

Does this sound correct?

If so, can someone put into layman terms why source code only doesn't pick up load image requests?

Many thanks for your help, chaps.

Tobo.
Zergei
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 17th Aug 2006 22:19 Edited at: 17th Aug 2006 22:21
Im not sure of what im going to say, but might be this aswell. When a project is done, it uses its directory as the default for loading anything without a complete directory when called, For example, if you do

load image "ball.bmp",1,1

then, if you've saved the project in "c:\dbpro", then when loading that image it will add this on the begginning, resulting in trying to load the image in the following folder "c:\dbpro\ball.bmp".

However, if you state all the directory, such as...

load image "c:\images\ball"

then it won't use the projects directory.
It might be because you didn't save the project and code on the same folder the image was, and thus throwing an error.

Further on my stuff at...
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 18th Aug 2006 17:11
This has hapened to me before. I think it's best to use a whole dbpro file when making a project, instead of just a .dba file.

Login to post a reply

Server time is: 2024-11-26 14:48:39
Your offset time is: 2024-11-26 14:48:39