示例#1
0
static int
getgifpix(			/* get a single pixel from our picture */
	int  x,
	int  y
)
{
	getrow(y);
	if (greyscale)
		return((normbright(scanln[x])*ncolors)>>8);
	if (pixscan != NULL)
		return(pixscan[x]);
	return(samplefac ? neu_map_pixel(scanln[x]) : map_pixel(scanln[x]));
}
示例#2
0
void remap_image_colormap(void)
{
    struct _pics   *pics;
    BYTE	   col[3];
    int		   i;
    int		   p;

    for (pics = pictures; pics; pics = pics->next)
	if (pics->bitmap != NULL && pics->numcols > 0) {
	    for (i=0; i<pics->numcols; i++) {
		/* real color from the image */
		col[N_RED] = pics->cmap[i].red;
		col[N_GRN] = pics->cmap[i].green;
		col[N_BLU] = pics->cmap[i].blue;
		/* X color index from the mapping */
		p = neu_map_pixel(col);
		pics->cmap[i].pixel = image_cells[p].pixel;
	    }
	}
    free_pixmaps(&objects);
}