savebuffer

BlitzMax Forums/BlitzMax Programming/savebuffer

mongia2(Posted 2005) [#1]
excuse my bad english

in blitz3d i use a :
SaveBuffer (buffer,filename$)

in bmax
?????

thanks


tonyg(Posted 2005) [#2]
There is no savebuffer.
However, this post...
here
has some code to save pixmaps as bmp, png etc.
You'll need to use grabimage or convert an image to a pixmap.


ImaginaryHuman(Posted 2005) [#3]
Do you need to save it in an image file format or just as raw data?

You can use WriteStream and use the type method stream.write to output a chunk of memory (takes byte ptr position and size). I use it to output a raw dump of my screen, after having used glReadPixels to grab the whole thing into a memory bank. ... similarly you can use GrabPixmap and PixmapPixelPtr.