22 for (x = 0; x <
width; x++, p++) {
28 fputc((
unsigned char)r, output);
29 fputc((
unsigned char)g, output);
30 fputc((
unsigned char)b, output);
44 mask_name[strlen(mask_name) - 2] =
'g';
46 output = fopen(mask_name,
"wb");
55 for (x = 0; x <
width; x++, p++) {
61 fputc((
unsigned char)(255 - a), output);
void G_free(void *buf)
Free allocated memory.
char * G_store(const char *s)
Copy string to allocated memory.
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,...)