[solved] SaveScreenShot is just bmp? [answer: no]

Started by eri0o, Tue 25/09/2018 02:06:47

Previous topic - Next topic

eri0o

was looking SaveScreenShot in the manual today... I noticed it says one can choose either .pcx or .bmp .
I think it's only .bmp, but I am not sure, since it appears it just saves the buffer directly to file. Just wanted to fix it, since I think .pcx only exists in the engine for preload.pcx image (but I can be wrong).

Crimson Wizard

#1
Quote from: eri0o on Tue 25/09/2018 02:06:47
I think it's only .bmp, but I am not sure, since it appears it just saves the buffer directly to file.

It does not save the buffer to file, if you refer to the name of a "buffer" variable in SaveScreenShot function then the type of that variable is Bitmap class pointer, and Bitmap saves itself using Allegro's save_bitmap function.
Quote
Writes a bitmap into a file, using the specified palette, which should be an array of 256 RGB structures. The output format is determined from the filename extension: at present this function supports BMP, PCX and TGA formats.
Whether Allegro does its work is something that may be tested.

eri0o

ah ok! I am sorry, from the name I assumed bitmap only - as in .bmp only. 

SMF spam blocked by CleanTalk