52 |
|
|
53 |
|
int bradj = 0; /* brightness adjustment */ |
54 |
|
|
55 |
+ |
int ncolors = 0; /* number of colors requested */ |
56 |
+ |
|
57 |
|
char *progname; |
58 |
|
|
59 |
|
|
61 |
|
int argc; |
62 |
|
char *argv[]; |
63 |
|
{ |
62 |
– |
int ncolors = 0; |
64 |
|
int bitsperpix; |
65 |
|
int i; |
66 |
|
#ifdef MSDOS |
143 |
|
exit(0); |
144 |
|
userr: |
145 |
|
fprintf(stderr, |
146 |
< |
"Usage: %s [-b][-c ncolors][-g gamv][-e +/-stops] input [output]\n", |
146 |
> |
"Usage: %s [-b][-d][-n samp][-c ncolors][-g gamv][-e +/-stops] input [output]\n", |
147 |
|
progname); |
148 |
|
exit(1); |
149 |
|
} |
229 |
|
|
230 |
|
getrow(y); |
231 |
|
if (greyscale) |
232 |
< |
return(normbright(scanln[x])); |
232 |
> |
return((normbright(scanln[x])*ncolors)>>8); |
233 |
|
if (pixscan != NULL) |
234 |
|
return(pixscan[x]); |
235 |
|
return(samplefac ? neu_map_pixel(scanln[x]) : map_pixel(scanln[x])); |