1 |
+ |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
+ |
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
5 |
|
#endif |
19 |
|
*/ |
20 |
|
|
21 |
|
#include <stdio.h> |
22 |
+ |
#include <math.h> |
23 |
+ |
#ifdef MSDOS |
24 |
+ |
#include <fcntl.h> |
25 |
+ |
#endif |
26 |
|
#include "color.h" |
27 |
|
#include "resolu.h" |
28 |
|
|
29 |
+ |
extern char *malloc(); |
30 |
|
|
31 |
|
double gamma = 2.2; /* gamma correction */ |
32 |
|
|
78 |
|
progname, argv[i+1]); |
79 |
|
exit(1); |
80 |
|
} |
81 |
+ |
#ifdef MSDOS |
82 |
+ |
setmode(fileno(stdin), O_BINARY); |
83 |
+ |
setmode(fileno(stdout), O_BINARY); |
84 |
+ |
#endif |
85 |
|
setcolrgam(gamma); /* set up gamma correction */ |
86 |
|
if (reverse) { |
87 |
|
/* get their image resolution */ |