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 Discussion / what do these numbers mean

Author
Message
newholland99
21
Years of Service
User Offline
Joined: 11th Oct 2003
Location:
Posted: 3rd Nov 2003 22:43
the get image 1,0,0,256,256 What are these numbers. Does every bmp have there own numbers?

Thanks Chris
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 3rd Nov 2003 22:52 Edited at: 3rd Nov 2003 22:55
1=image number
1st 0=the x coordinate of where the get image command is from
2nd 0= the y coodrinate " "
1st 256=the x coord of where the get image command stops
2nd 256=the y coord " "

this command grabs an area of the screen and saves it as an image.
#edit see below for a better explanation!!!


Go on, click on my signature image, you know you want to
Favourite smiley>>>
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 3rd Nov 2003 22:54
Syntax: get image imageNo,left,top,right,bottom

imageNo is the number of the image you want to create. Each image has a separate number.
Left : left edge of the image you are grabbing (in pixels)
Top : top edge of the image you are grabbing (in pixels)
Right : right edge of the image you are grabbing (in pixels)
Bottom : bottom edge of the image you are grabbing (in pixels)

Get image grabs and image from the current bitmap, which is usually the last bitmap you created or if you didnt create one the screen itself. The top edge of a bitmap is always 0, as is the left edge, but you dont have to grab from the top or left edges. The right and bottom edges depend on the bitmap's size.

I would be unstoppable if I could just get started...
newholland99
21
Years of Service
User Offline
Joined: 11th Oct 2003
Location:
Posted: 3rd Nov 2003 23:29
so where do i look to get the image number? Thanks a million
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 3rd Nov 2003 23:34
You give it yourself. An image number is the way you can always identify an image and use it whenever you need it. Usually you just increment, so you start off with 1, then 2 etc. Also take in mind that you cannot have two images with the same image number, or you'll get an error.

Cheers,
Kentaree

I would be unstoppable if I could just get started...
newholland99
21
Years of Service
User Offline
Joined: 11th Oct 2003
Location:
Posted: 3rd Nov 2003 23:46
ok i see now. each image u edit to dark basic goes 1...2 and so on. ok thanks. I tried cave.bmp and i got an error for that number line. I used and example and just added cave.bmp The cave was made in 3ds max 5.
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 3rd Nov 2003 23:51
Are you trying to load a 3D model as an image maybe?

I would be unstoppable if I could just get started...
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 4th Nov 2003 06:21
@newholland99:

Just look in the help files, everythign is explained in there (sometimes not very clearly, but if you use the examples, then you'll understand it)

Hope I helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-21 10:17:00
Your offset time is: 2025-05-21 10:17:00