savebuffer

BlitzMax Forums/BlitzMax Programming/savebuffer

excuse my bad english

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

in bmax
?????

thanks

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.

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.