Saving Images

Blitz3D Forums/Blitz3D Programming/Saving Images

Nigel Brown(Posted 2003) [#1]
Can anyone point me in the right direction? I wish to save my image buffer in multiple formats not just bmp and JPG. for example I would like to save my image buffer as a monochromatic GIF or perhaps a PNG?


_PJ_(Posted 2003) [#2]
I would have thought Blitz could save as PNG as it can Load them in okay.

GIF's are probably not as simple, because they are counted as animations not images.


jhocking(Posted 2003) [#3]
My initial impulse is to ask why you want/need to do this since you could easily convert the images later but assuming you have a good reason I pretty much say the same things as Malice. I've never used SaveBuffer (the command to save out a screenshot) so I don't know what file formats are supported. Have you actually tried saving to png? If that is supported you would just have to name the file appropriately, using .png for the file extension, when calling SaveBuffer.

Similarly, I agree that saving a GIF would be more complicated. Especially monochromatic; you would need to do a lot of processing of the image, using commands like Read and WritePixel.