The cropmask.XXX file provides a mask for cropped lev1 images with image configuration id XXX. The mask is a 1D byte array containing a zero at addresses corresponding to pixels outside the crop radius and a one otherwise. (The pixel addresses start with zero at the lower left corner of the image.) The code below reads a lev0 crop table on stdin and writes the lev1 cropmask on stdout. It is for 4-port read-out, two-row and two-column overscan configurations only; minor changes will be needed for other configurations. ============= /home/kehcheng/work/hmicomp/makecropmask.c ============== #include char mask[16777216]; main() { int cropid, width, height, skip, take, i, j; memset(mask,0,16777216); scanf("%d", &cropid); scanf("%d", &width); scanf("%d", &height); for (i=0; i< 2048; ++i) { scanf("%d %d", &skip, &take); for (j=0; j