30 mask_name[strlen(mask_name) - 2] =
'g';
32 mask = fopen(mask_name,
"wb");
43 const unsigned int *row = (
const unsigned int *)(
ca.
grid + y *
ca.
stride);
45 for (x = 0; x <
ca.
width; x++) {
46 unsigned int c = row[
x];
47 int a = (c >> 24) & 0xFF;
48 int r = (c >> 16) & 0xFF;
49 int g = (c >> 8) & 0xFF;
50 int b = (c >> 0) & 0xFF;
52 if (a > 0 && a < 0xFF) {
58 fputc((
unsigned char)r, output);
59 fputc((
unsigned char)g, output);
60 fputc((
unsigned char)b, output);
61 fputc((
unsigned char)a, mask);
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_free(void *)
Free allocated memory.
GRASS cairo display driver - header file.
void output(const char *fmt,...)
void cairo_write_ppm(void)
char * G_store(const char *)
Copy string to allocated memory.