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 / Cannot Load Bitmap

Author
Message
GMonk
18
Years of Service
User Offline
Joined: 17th Nov 2005
Location:
Posted: 17th Nov 2005 14:09
Hi, I'm new to Darkbasic and I'm following the tutorials.

I'm having a problem loading my own bitmaps/images though. I'm making sure that the images are located in the same directory as the project.

First, I've tried just a simple

Next, I tried

Then, I tried the example for within Darkbasic itself:
Now, this actually works, but as soon as I replace bitmap0.bmp with my own bitmap (and actually copying my own bitmap to the same directory), it fails to load it. Which led me to believe the problem lies with my images.

So, I edited my image to make it the same size as the one used in the example but it still wouldn't load. I've tried changing my images file extension (jpg, png etc) but still no dice.

Anyone got any clues as to whats wrong with images?!

P.S: I've also tried changing the display mode (EG: set display mode 1280, 1024, 32 etc).
GMonk
18
Years of Service
User Offline
Joined: 17th Nov 2005
Location:
Posted: 17th Nov 2005 15:07
Hmm, it seems I wasn't using the latest version of Darkbasic (automatically assumed the electronic version I bought was the latest version).

Anyway, updated DB and it seems ok now.
General Sephiro
19
Years of Service
User Offline
Joined: 27th Sep 2004
Location:
Posted: 17th Nov 2005 15:36 Edited at: 17th Nov 2005 15:37
Ensure the image is inside the same directory not just the project file

The dark basic tutorial code u got said :
load bitmap "pics\bitmap0.bmp"

If your using this make sure your image is in the file named pics. Ensure you save the image as a .bmp aswell..

Hope that helps



___________________________________
LOAD IMAGE "name.bmp"

I don't think that code should work, considering you havn't stated an ID for the image

`1 being the ID
Load Image "Name.bmp",1

Captain America
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 19th Nov 2005 02:27
ya you just forgot the ,1 after the image name.



-Captain-


Cheers,
Capt. America

Login to post a reply

Server time is: 2024-09-24 09:34:42
Your offset time is: 2024-09-24 09:34:42