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.

DarkBASIC Professional Discussion / my images wont load

Author
Message
MC Man
13
Years of Service
User Offline
Joined: 14th Feb 2013
Location:
Posted: 24th Feb 2013 23:45
how do i load my images into darkbasic pro? do I use jpgs or bmps?
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 25th Feb 2013 05:17 Edited at: 25th Feb 2013 05:20
You had better begin with a beginner board
http://forum.thegamecreators.com/?m=forum_read&i=7


save image


load image
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 25th Feb 2013 05:40 Edited at: 25th Feb 2013 05:49
from the help file for load image:
Quote: "The picture file must be of the BMP, JPG, TGA, DDS, DIB or PNG format"

so any of those will be fine.

your code for reference:


one tip is to get in the habit of using relative file paths vs literal locations on your computer so that when you share the game, others, who won't have the game in the exact same location on their systems, can (load the images and) play it.

having a media folder that holds all your images/media would be ideal. here's code example for loading and displaying images kept in a media folder next to the location of your game/app/exe file.

play with the commands we've mentioned here and see what you can put together to achieve your goal.

and, F1 from within the IDE is your friend

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit

Login to post a reply

Server time is: 2026-07-07 18:44:29
Your offset time is: 2026-07-07 18:44:29