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 / Error while loading images

Author
Message
Dietrich
15
Years of Service
User Offline
Joined: 15th Aug 2009
Location:
Posted: 18th Aug 2009 23:30 Edited at: 19th Aug 2009 15:35
Hey!
When I try to run any games I have made I get the following error:

Error
cwd:c://blahblahblah LOAD IMAGE club01.png

The code I am using is :


Yes,I did add the media,clicked "add" in the media bar and added the image,yet I get the aforementioned error.
Could somebody shed some light on this problem/how to fix it?
Cheers,
Dietrich.

"Don't practice 'til you get it right,practice 'til you never get it wrong."
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Aug 2009 01:33 Edited at: 19th Aug 2009 01:35
If you get the error that it can't load "club01.png" and you say that the code snip you provided is what your working with... then you haven't posted the entire code. It won't tell you there's an error loading "club01.png" if you're truly only trying to load "DSCF058.JPG".

You don't always have to add the file to .exe if the files you're trying to load are in the same directory as the source code. You can also create a directory within the source codes directory to store any files you need. You just need to add the directory name to the filename.



bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 19th Aug 2009 09:10
did you changed the exe file type to media?

Dietrich
15
Years of Service
User Offline
Joined: 15th Aug 2009
Location:
Posted: 19th Aug 2009 15:29
Woops sorry meant to edit the code to club01.gif,but even if I have set it to load "club01.gif" it still won't load the image at all.Everything is set up correctly and it just won't load any images!

"Don't practice 'til you get it right,practice 'til you never get it wrong."
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 20th Aug 2009 09:31
Ah, I don't know what update caused it but I can't load .gif images either. You can reload that .gif in a drawing program and resave it as either a .bmp or .png so Darkbasic doesn't have any problems loading it.

Most of us only use .png because .bmp and .jpg don't keep the alpha channel (transparency). When you use .png you can create effects like transparent windows on buildings/cars that allows the background to be seen through the window.

.jpgs are the worst because they always change the colors on all images. If you have one color when you draw it... when you reload it that one color will be changed to many close colors but nothing near your original image. So keep away from .jpg like it's a horrible disease.

If you don't have a drawing program that saves in .png upload the image and I can convert it for you.

Login to post a reply

Server time is: 2024-11-25 03:07:19
Your offset time is: 2024-11-25 03:07:19