printf("Warning: found pixel pair, but second is transparent\n");
printf("Warning: found pixel pair, but second is transparent\n"); #endif
static int find_runs(short *runs, unsigned char *pixptr, int x,	int w){    int runcnt = 0;    while (x < w && pixptr[1] != 0) {	// Stop at first transparent pixel.	int run = 0;		// Look for repeat.	while (x < w - 1 && pixptr[0] == pixptr[2] && pixptr[3]!=0) {	    if(pixptr[3]==0)		printf("Warning: found pixel pair, but second is transparent\n");	    x++;	    pixptr+=2;	    run++;	}	if (run) {		// Repeated?  Count 1st, shift, flag.	    run = ((run + 1)<<1)|1;	    x++;		// Also pass the last one.	    pixptr+=2;	} else {		do {			/* Pass non-repeated run of */		    x++;		    pixptr+=2;		    run += 2;	// So we don't have to shift.		} while (x < w && pixptr[1] != 0 &&		 (x == w - 1 || pixptr[0] != pixptr[2]));	}	// Store run length.	runs[runcnt++] = run;    }    runs[runcnt] = 0;		/* 0-delimit list. */    return x;}