Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, NewbieZorro), 16,055 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Capturing screen image and saving to bitmap. #236118
11/11/08 22:23
11/11/08 22:23
Joined: Aug 2006
Posts: 70
NJ
S
SirCamaris Offline OP
Junior Member
SirCamaris  Offline OP
Junior Member
S

Joined: Aug 2006
Posts: 70
NJ
I'm trying to capture a screen image and save it as a bitmap in the game folder, but it doesn't work. The goal is to create a bitmap called "result.bmp" Here is my code:

BMAP* screen_shot_map = "#400x300x16"; //create temporary bitmap

function grab_screen()

{bmap_for_screen(screen_shot_map,1,0); //get screen image
if (key_p == 1)
bmap_save(screen_shot_map,"result.bmp"); //place screen image into "result.bmp" after pressing key_p
}

function main()

{video_mode = 7;
level_load("BrooklynApartments.wmb");
wait(3);
grab_screen();
}

Re: Capturing screen image and saving to bitmap. [Re: SirCamaris] #236129
11/11/08 23:09
11/11/08 23:09
Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
F
flutschi Offline
Junior Member
flutschi  Offline
Junior Member
F

Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
Hmm, in der Hilfe steht..

"Nur 16-Bit-Bitmaps von PCX oder BMP Bilddateien können verwendet werden. Die modifizierte Bitmap wird mit game_save gesichert, ist aber frühestens einen Framezyklus nach der bmap_for_screen-Anweisung verfügbar (fügen Sie wait(1) ein). "

"depth -
Farbtiefe 0 keine Änderung
16 16 bit / high color
32 32 bit / true color
"

Nun die Frage:

Hast du standart 32 Bit? dann wird das GameStudio wohl übernehmen und dadurch hast du nicht die bedingungen für bmap_for_screen erfüllt, die da währen "nur 16-Bit..."

und da steht noch "... füge ein Wait(1) ein.. " was ich bei dir auch nicht sehe.. smile


Ich hab noch nie mit screenshots gearbeitet, aber so wie's in der Hilfe steht würde das zu deinem Problem passen..

Hoffe hat dir geholfen!


PS: ich arbeite in der Main mit ON_P = grab_screen();.. ich habs so in nem Tutorial gelernt, und nu frage ich mich was besser ist? deine Version oder meine?


My System:
Intel Core 2 Duo CPU P8400 @ 2.26 GHz
4 GB Ram
NVIDIA GeForce 9600M GT
32 Bit Windows Vista
***********************************
Gamestudio Pro 7.50 / WED V6.875
Re: Capturing screen image and saving to bitmap. [Re: SirCamaris] #236133
11/12/08 01:10
11/12/08 01:10
Joined: Aug 2006
Posts: 70
NJ
S
SirCamaris Offline OP
Junior Member
SirCamaris  Offline OP
Junior Member
S

Joined: Aug 2006
Posts: 70
NJ
Pressing F6 will take a screenshot(@ set resolution) and place it in the folder containing the .wmb. "file_for_screen and SAVEDIR" are two other commands mentioned in the acknex manual for saving screen shots(although I haven't been able to implement them yet).


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1