19 #define min(a,b) ((a)<(b)?(a):(b)) 22 #define max(a,b) ((a)>(b)?(a):(b)) 34 const unsigned char *buf)
44 for (j = j0; j < j1; j++) {
47 for (i = i0; i < i1; i++) {
49 unsigned int k = buf[j * ncols + i];
63 for (j = j0; j < j1; j++) {
66 for (i = i0; i < i1; i++) {
68 unsigned int k = buf[j * ncols + i];
71 unsigned int a,
r,
g,
b;
75 a = (a0 * (255 - k) + a1 * k) / 255;
76 r = (r0 * (255 - k) + r1 * k) / 255;
77 g = (g0 * (255 - k) + g1 * k) / 255;
78 b = (b0 * (255 - k) + b1 * k) / 255;
GRASS png display driver - header file.
void png_get_pixel(unsigned int pixel, int *r, int *g, int *b, int *a)
unsigned int png_get_color(int r, int g, int b, int a)
void PNG_draw_bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
Draw bitmap.