19 |
|
*/ |
20 |
|
|
21 |
|
#include <stdio.h> |
22 |
+ |
#include <math.h> |
23 |
|
#ifdef MSDOS |
24 |
|
#include <fcntl.h> |
25 |
|
#endif |
28 |
|
|
29 |
|
extern char *malloc(); |
30 |
|
|
31 |
< |
double gamma = 2.2; /* gamma correction */ |
31 |
> |
double gamcor = 2.2; /* gamma correction */ |
32 |
|
|
33 |
|
int bradj = 0; /* brightness adjustment */ |
34 |
|
|
50 |
|
if (argv[i][0] == '-') |
51 |
|
switch (argv[i][1]) { |
52 |
|
case 'g': /* gamma correction */ |
53 |
< |
gamma = atof(argv[++i]); |
53 |
> |
gamcor = atof(argv[++i]); |
54 |
|
break; |
55 |
|
case 'e': /* exposure adjustment */ |
56 |
|
if (argv[i+1][0] != '+' && argv[i+1][0] != '-') |
82 |
|
setmode(fileno(stdin), O_BINARY); |
83 |
|
setmode(fileno(stdout), O_BINARY); |
84 |
|
#endif |
85 |
< |
setcolrgam(gamma); /* set up gamma correction */ |
85 |
> |
setcolrgam(gamcor); /* set up gamma correction */ |
86 |
|
if (reverse) { |
87 |
|
/* get their image resolution */ |
88 |
|
read_skel_head(&xmax, &ymax); |