Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef H_TO_FILE
00010 #define H_TO_FILE
00011
00012
00013 #define UWORD unsigned short
00014 #define ULONG unsigned long
00015 #define UBYTE unsigned char
00016
00017 #define XIMG_MAGIC 0x58494D47
00018
00019
00020 typedef enum { IMG, XIMG } FILE_TYP;
00021
00022 const char *get_file_ext(FILE_TYP typ);
00023
00024 struct RGB
00025 {
00026 UWORD r, g, b;
00027 };
00028
00029 int bitmap_to_file(FILE_TYP typ, int ww, int wh,
00030 unsigned int pwx, unsigned int pwy,
00031 unsigned int planes, unsigned int colors,
00032 const char *filename,
00033 void (*get_color) (unsigned int colind, struct RGB *rgb) ,
00034 void (*get_pixel) (int x, int y, unsigned int *colind) ) ;
00035
00036 #endif
00037