bmap_save(BMAP*, STRING* name)
Saves a bitmap to an image
|| Bitmap pointer.
|| Image file name in .jpg, .png, .bmp, .dds,
or .tga format, STRING* or char*.
- The file is saved to the current folder. It contains all modifications
applied during gameplay.
The allocated bitmap size (always a power of two) is saved in engine versions up to 7.85; from 7.86 on the size given in the BMAP definition is saved.
DirectX is used for saving the image; therefore some restrictions apply. The jpg quality can not be adjusted and the jpg image size must be a multiple of 8.
The bmp format can only be read back by bmap_load; it is saved in an unusual 32 bit format and thus can not be used for BMAP definitions or for textures.
wait(1); // video device must be openend for saving bitmaps
BMAP* b = bmap_createblack(123,456,24);
BMAP, bmap_purge, bmap_load