18 #include <grass/gis.h> 34 for (x = 0; x <
png.
width; x++, p++) {
40 fputc((
unsigned char)r, output);
41 fputc((
unsigned char)g, output);
42 fputc((
unsigned char)b, output);
56 mask_name[strlen(mask_name) - 2] =
'g';
58 output = fopen(mask_name,
"wb");
67 for (x = 0; x <
png.
width; x++, p++) {
73 fputc((
unsigned char)(255 - a), output);
GRASS png display driver - header file.
char * G_store(const char *s)
Copy string to allocated memory.
void png_get_pixel(unsigned int pixel, int *r, int *g, int *b, int *a)
void G_fatal_error(const char *msg,...)
Print a fatal error message to stderr.
void output(const char *fmt,...)
void G_free(void *buf)
Free allocated memory.