save_bitmap man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

save_bitmap(3)			Allegro manual			save_bitmap(3)

NAME
       save_bitmap  -  Saves  a bitmap into any supported file format. Allegro
       game programming library.

SYNOPSIS
       #include <allegro.h>

       int save_bitmap(const char *filename, BITMAP *bmp, const RGB *pal);

DESCRIPTION
       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.

       Two  things  to	watch out for: on some video cards it may be faster to
       copy the screen to a memory bitmap and save the latter, and if you  use
       this  to	 dump the screen into a file you may end up with an image much
       larger than you were expecting, because Allegro often  creates  virtual
       screens	larger	than  the  visible  screen. You can get around this by
       using a sub-bitmap to specify which part of the screen to save, eg:

	  BITMAP *bmp;
	  PALETTE pal;
	  ...
	  get_palette(pal);
	  bmp = create_sub_bitmap(screen, 0, 0, SCREEN_W, SCREEN_H);
	  save_bitmap("dump.pcx", bmp, pal);
	  destroy_bitmap(bmp);

RETURN VALUE
       Returns non-zero on error.

SEE ALSO
       save_bmp(3), save_pcx(3),  save_tga(3),	load_bitmap(3),	 register_bit‐
       map_file_type(3)

Allegro				 version 4.4.2			save_bitmap(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net