NAME
====
  vg_bitmap_save() - save a bitmap into a file


SYNOPSIS
========
  int vg_bitmap_save(const bitmap * bmp, const char * filename, int flag)


DESCRIPTION
===========
  Use it to save a bitmap into a file, e.g. for a screen-shot.
  bmp is the bitmap you want to save, or NULL for the window.
  filename is the file to save the bitmap into, with a relative path
  to your game-directory or with an absolute path.

  With flag you can specify the format of the saved bitmap:
   - VGAFORMAT_VGA:  VgaGames-bitmap-format
   - VGAFORMAT_BMP:  Windows bitmap format
   - VGAFORMAT_PPM3: plain ppm format (P3)
   - VGAFORMAT_PPM6: raw ppm format (P6)


RETURN VALUE
============
  If it succeeds, 0 is returned.
  If an error occurs, -1 is returned and an error message is printed to stderr.


SEE ALSO
========
  Index
  Understanding bitmaps
  vg_bitmap_createnew()
  vg_bitmap_createfromfile()
  vg_bitmap_createfromtext()
  vg_bitmap_duplicate()
  vg_bitmap_width()
  vg_bitmap_height()
  vg_bitmap_getpixel()
  vg_bitmap_clear()
  vg_bitmap_copyto()
  vg_bitmap_rotate()
  vg_bitmap_zoom()
  vg_bitmap_mirror()
  vg_bitmap_overlap()
  vg_bitmap_free()