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 / Why a image won't load?

Author
Message
Random color object
16
Years of Service
User Offline
Joined: 14th Aug 2008
Location: Montreal Canada
Posted: 15th Aug 2008 05:16

Is there any reason why a image wont load?

My actual color is Color object 1, RGB(128,2,3) but I would like it to be random.
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 15th Aug 2008 10:13
1/. Is it definitely spelt right?
2/. Is the image in a sub folder called media and not in the same folder as the exe?
3/. Is the image corrupt (tried loading a different image)?

What happens when you try to load the image?

=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 15th Aug 2008 12:35
The load image command loads an image into memory for use with the image or sprite commands (see DBPro help files).

It doesn't display anything on the screen.

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
Nano brain
16
Years of Service
User Offline
Joined: 7th May 2008
Location:
Posted: 16th Aug 2008 01:33 Edited at: 16th Aug 2008 01:33
Also...

1) Are you using the default editor for DBP?
2) If so then make sure that you have saved everything as a project, and not just source code

I have found that no external anything will load using the deafult editor, unless the source code I am trying to execute is part of a project.
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 17th Aug 2008 17:10
Quote: "The load image command loads an image into memory for use with the image or sprite commands (see DBPro help files). It doesn't display anything on the screen."


As prof said, load image only loads an image in memory ready to be displayed. Add Paste Image 1,10,10 straight after and see if it displays.

Sonic 91 Software
19
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 17th Aug 2008 20:43
Quote: "load image "media/rainbow_20.png", 1"


You've got the '/' the wrong way round when changing to a different directory. It needs to be like '\', i.e.

load image "media\rainbow_20.png",1 (only without the \ in bold, I just did that to emphasise.)

This should work.

Fight the good fight of faith,
Lay hold on Eternal Life.
-1 Timothy 6:12-
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 17th Aug 2008 21:32
Quote: "You've got the '/' the wrong way round when changing to a different directory"

this / and this \ doesn't really matter they both work the same way(I load media using /).

Login to post a reply

Server time is: 2024-11-15 21:03:05
Your offset time is: 2024-11-15 21:03:05