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 / Getting Confused on BITMAP and IMAGE functions

Author
Message
DEvil
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 23rd Mar 2008 13:36
Hi Community,

At testing the functionality of some graphical Functions
i have written an small Snippet. But it does not what i want!

The first is shown perfectly.
The second only shows an black Box and
The third i have never seen.

A) Why?
B) What is the internal Difference of an Bitmap and an Image?
C) For me an Bitmap is an Image and reverse Order too.
What i can/do not see at this Point?



____________________________________________________________
I'am Sorry for my (possibly) bad English
Greetings from Germany
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 23rd Mar 2008 13:48
as far as the difference between an image and a bitmap, I cannot help u as I myself wonder ... for me, an image is a bitmap and vice versa ... could someone please clarify this? thank u

Could you help me treat my injured Dino-Fly ?
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 23rd Mar 2008 20:52
WindowsKiller: if a BITMAP is the video memory buffer screen, if I call SAVE BITMAP, will it save a screenshot of the current view ????

Could you help me treat my injured Dino-Fly ?
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 23rd Mar 2008 21:37
ahhh so do u know a way in which I could make a screenshot in DBPro ???

Could you help me treat my injured Dino-Fly ?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd Mar 2008 22:09
Get Image ImgNum,0,0,Screen Width(),Screen Height()
Save Image "Filename.ext",ImgNum


But, this will not save any sprites unless you have used the Paste Sprite command and/or disabled the sprites Restore Background flag.

The idea of Bitmaps is for either loading unseen images which contain multiple smaller images (which you then grab with Get Image), or for building up screens a bit at a time until they are completed - at which time you can use Get Image - or Copy Bitmap.

TDK_Man

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 23rd Mar 2008 22:35
ahhh cool !!! so u say that if my sprites are created using the SPRITE command, they will not show up in the capture ??? nasty

Could you help me treat my injured Dino-Fly ?
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 24th Mar 2008 05:06
Yes, the sprites don't actually draw onto Bitmap 0, which is where the image is got from, they just kind of hang out on top of it.

DEvil
16
Years of Service
User Offline
Joined: 1st Mar 2008
Location:
Posted: 24th Mar 2008 15:24 Edited at: 24th Mar 2008 15:28
Hello Community,

i am back, now after Analysis ^^
Now i understand DBPro BITMAP-Commands as Commands for an "Virtual Screen"! Screen/Bitmap-Number 0 is always the Real Screen, Screen/Bitmap 1-32 is to understand like Virtual Screens. The Size of Pictures you create or load into this Screens/Bitmaps can be higher than the Resolution of your RealScreen/Desktop/FullScreenMode!

For better understanding how to use and what i mean:
Please download this EXAMPLE-IMAGE you need for the following Snippet,
and place it in the Project Directory (where the exe is compiled)



KNOWN TRAP DOORS BY USING BITMAP FUNCTIONS:
1 - Load Bitmap "filename.ext", bitnum
Every LOAD BITMAP command changes the CURRENT BITMAP too. This is why you must Restore to the Screen where you want to make some output's (if needed) else the Output is painted on the virtual Screen setted up by LOAD BITMAP, and if also, (maybe) you don't see the Result you want have.

2 - Copy Bitmap s,sx1, sx1, sx2, sy2, d, dx1, dy1, dx2, dy2
If the (S)ource and/or (D)estination Coordinates are out of Area from the Screen and/or Bitmap(Virtual Screen), the Command has the Behavior as it isn't Used, then it is still ignored and doe's nothing! The Result is that (maybe) you don't see the copied area.

____________________________________________________________
I'am Sorry for my (possibly) bad English
Greetings from Germany

Login to post a reply

Server time is: 2024-11-25 05:10:49
Your offset time is: 2024-11-25 05:10:49