9 static unsigned char *put_2(
unsigned char *p,
unsigned int n)
17 static unsigned char *put_4(
unsigned char *p,
unsigned int n)
29 static void make_bmp_header(
unsigned char *p)
62 memset(header, 0,
sizeof(header));
63 make_bmp_header(header);
64 fwrite(header,
sizeof(header), 1, output);
67 for (x = 0; x <
width; x++, p++) {
73 fputc((
unsigned char)b, output);
74 fputc((
unsigned char)g, output);
75 fputc((
unsigned char)r, output);
76 fputc((
unsigned char)a, output);
void get_pixel(unsigned int pixel, int *r, int *g, int *b, int *a)
int G_fatal_error(const char *msg,...)
Print a fatal error message to stderr.
void output(const char *fmt,...)