14 #define min(a,b) ((a)<(b)?(a):(b))
17 #define max(a,b) ((a)>(b)?(a):(b))
21 const unsigned char *
buf)
31 for (j = j0; j < j1; j++) {
34 for (i = i0; i < i1; i++) {
36 unsigned int k = buf[j * ncols + i];
50 for (j = j0; j < j1; j++) {
53 for (i = i0; i < i1; i++) {
55 unsigned int k = buf[j * ncols + i];
57 unsigned int a0, r0, g0, b0;
58 unsigned int a,
r,
g,
b;
62 a = (a0 * (255 - k) + a1 * k) / 255;
63 r = (r0 * (255 - k) + r1 * k) / 255;
64 g = (g0 * (255 - k) + g1 * k) / 255;
65 b = (b0 * (255 - k) + b1 * k) / 255;
void PNG_draw_bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
void get_pixel(unsigned int pixel, int *r, int *g, int *b, int *a)
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
unsigned int get_color(int r, int g, int b, int a)