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 / Faster screen shotting?

Author
Message
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 19th Sep 2005 23:23
Is it actually possible to save the contents of the screen to a memblock?

I know of the save bitmap command, but that causes everything to stop for about 2 seconds while it actually does that, whereas it can seem to write 10000 lines to a file without syncing, and not have any visible on performance

(and then have a section in the menus to convert the memblock back to a normal bitmap... I know I could download fraps, but if possible, I'm trying to require as few external apps as possible...

Thanks in advance, even if it's just not possible...

...maybe one day I'll finish a project
Leeorg
19
Years of Service
User Offline
Joined: 5th Jul 2005
Location:
Posted: 19th Sep 2005 23:27
Yes it is,
MAKE MEMBLOCK FROM BITMAP memblock no,bitmap no
Since zero for a bitmap is the screen
MAKE MEMBLOCK FROM BITMAP 1,0 will copy the screen to memblock no 1

To reverse it, MAKE BITMAP FROM MEMBLOCK 0,1

Yours
Lee
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 21st Sep 2005 17:38 Edited at: 21st Sep 2005 17:39
The code above is faster - but still a little slow...

Screen (as a jpeg) to memblock?

(Have I hit a dead end with this idea?)

...maybe one day I'll finish a project
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 21st Sep 2005 19:35
why not

get image img no.,0,0,screen width(),screen height()
save image img no.,"Blah.jpeg"


Leeorg
19
Years of Service
User Offline
Joined: 5th Jul 2005
Location:
Posted: 21st Sep 2005 20:31
Yeah that probably would be faster
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 22nd Sep 2005 14:11
I've never seen save image and get image before...
I should spend more time in the help page

Sorry if I've wasted your time on such obvious questions...

...maybe one day I'll finish a project
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 22nd Sep 2005 15:37
well save image is pretty obvious what it does
get image grabs a part of a bitmap (in this case bitmap 0),

get image img no. from here x,from here y, to here x, to here y

if you know what i mean, i suck at explaining things


SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 22nd Sep 2005 18:25 Edited at: 22nd Sep 2005 18:26
I know WHAT it does - I've just never known the command even existed until I read your post...

...maybe one day I'll finish a project

Login to post a reply

Server time is: 2025-05-22 14:56:18
Your offset time is: 2025-05-22 14:56:18