capture screen

BlitzMax Forums/BlitzMax Beginners Area/capture screen

hub(Posted 2006) [#1]
hi !
how to capture your game actual screen and store it into a pixmap ?
thanks !


tonyg(Posted 2006) [#2]
Grabpixmap?


hub(Posted 2006) [#3]
Thanks i've found this into the help

Graphics 640,480,32

Cls

DrawLine 0,0,32,32
DrawLine 32,0,0,32
DrawOval 0,0,32,32

Local image=CreateImage(32,32,1,DYNAMICIMAGE|MASKEDIMAGE)

GrabImage image,0,0

Cls
For Local i=1 To 100
	DrawImage image,Rnd(640),Rnd(480)
Next
Flip

WaitKey



tonyg(Posted 2006) [#4]
That's not storing it into a pixmap but if it's doing what you want then OK.
Graphics 640,480
image:TImage=LoadImage("max.png")
SetClsColor 255,0,0
Cls
DrawImage image,0,0
Flip
mypixmap:TPixmap=GrabPixmap(0,0,640,480)
Cls
DrawPixmap mypixmap,0,0
Flip
WaitKey()