480 int rgbmap[256][3], bwmap[256];
502 colormap[0][
i] = (u_char)rgbmap[i][0]&0xff;
503 colormap[1][
i] = (u_char)rgbmap[i][1]&0xff;
504 colormap[2][
i] = (u_char)rgbmap[i][2]&0xff;
506 sprintf(buf,
"getsun.c%1d",levels);
507 pw_setcmsname(
pw, buf);
508 pw_putcolormap(
pw, 0, 4<<levels,colormap[0],colormap[1],colormap[2]);
525 for ( i = 0; i <
levelsc; i++ )
527 colormap[0][
i] = (u_char)bwmap[i]&0xff;
528 colormap[1][
i] = (u_char)bwmap[i]&0xff;
529 colormap[2][
i] = (u_char)bwmap[i]&0xff;
531 sprintf(buf,
"getsun.g%1d",levels);
532 pw_setcmsname(
pw, buf);
533 pw_putcolormap(
pw, 0,4<<levels, colormap[0],colormap[1],colormap[2]);
void bwdithermap(int levels, double gamma, int bwmap[], int divN[256], int modN[256], int magic[16][16])
void make_square(double N, int divN[256], int modN[256], int magic[16][16])
void dithermap(int levels, double gamma, int rgbmap[][3], int divN[256], int modN[256], int magic[16][16])