| 1 |
– |
/* Copyright (c) 1994 Regents of the University of California */ |
| 2 |
– |
|
| 1 |
|
#ifndef lint |
| 2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
| 2 |
> |
static const char RCSid[] = "$Id$"; |
| 3 |
|
#endif |
| 6 |
– |
|
| 4 |
|
/* |
| 5 |
|
* Convert from Radiance picture file to Compuserve GIF. |
| 6 |
|
* Currently, we don't know how to get back. |
| 8 |
|
|
| 9 |
|
#include <stdio.h> |
| 10 |
|
|
| 11 |
+ |
#include <time.h> |
| 12 |
+ |
|
| 13 |
|
#include "color.h" |
| 14 |
|
|
| 15 |
|
#include "resolu.h" |
| 51 |
|
|
| 52 |
|
int bradj = 0; /* brightness adjustment */ |
| 53 |
|
|
| 54 |
+ |
int ncolors = 0; /* number of colors requested */ |
| 55 |
+ |
|
| 56 |
|
char *progname; |
| 57 |
|
|
| 58 |
|
|
| 60 |
|
int argc; |
| 61 |
|
char *argv[]; |
| 62 |
|
{ |
| 62 |
– |
int ncolors = 0; |
| 63 |
|
int bitsperpix; |
| 64 |
|
int i; |
| 65 |
|
#ifdef MSDOS |
| 228 |
|
|
| 229 |
|
getrow(y); |
| 230 |
|
if (greyscale) |
| 231 |
< |
return(normbright(scanln[x])); |
| 231 |
> |
return((normbright(scanln[x])*ncolors)>>8); |
| 232 |
|
if (pixscan != NULL) |
| 233 |
|
return(pixscan[x]); |
| 234 |
|
return(samplefac ? neu_map_pixel(scanln[x]) : map_pixel(scanln[x])); |