Adventure Game Studio | Forums

AGS Development => Engine Development => Topic started by: eri0o on 25 Sep 2018, 02:06

Title: [solved] SaveScreenShot is just bmp? [answer: no]
Post by: eri0o on 25 Sep 2018, 02:06
was looking SaveScreenShot in the manual today... (https://adventuregamestudio.github.io/ags-manual/Game.html?highlight=savescreenshot#savescreenshot) 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).
Title: Re: SaveScreenShot is just bmp?
Post by: Crimson Wizard on 25 Sep 2018, 02:12
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 (https://www.allegro.cc/manual/4/api/loading-image-files/save_bitmap).
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.
Title: Re: SaveScreenShot is just bmp?
Post by: eri0o on 25 Sep 2018, 02:50
ah ok! I am sorry, from the name I assumed bitmap only - as in .bmp only.