10 |
|
#include <stdio.h> |
11 |
|
#include <math.h> |
12 |
|
#include <ctype.h> |
13 |
+ |
#include <time.h> |
14 |
|
#include "tiffio.h" |
15 |
|
#include "color.h" |
16 |
|
#include "resolu.h" |
161 |
|
if (i != argc-2) |
162 |
|
goto userr; |
163 |
|
/* consistency checks */ |
164 |
< |
if (CHK(C_GRY)) |
164 |
> |
if (CHK(C_GRY)) { |
165 |
|
if (cvts.phot == PHOTOMETRIC_RGB) |
166 |
|
cvts.phot = PHOTOMETRIC_MINISBLACK; |
167 |
|
else { |
168 |
|
cvts.phot = PHOTOMETRIC_LOGL; |
169 |
|
cvts.comp = COMPRESSION_SGILOG; |
170 |
|
} |
171 |
+ |
} |
172 |
|
if (CHK(C_TWRD|C_TFLT) == (C_TWRD|C_TFLT)) |
173 |
|
goto userr; |
174 |
|
|
543 |
|
cvts.tf = Color2RRGGBB; |
544 |
|
SET(C_RFLT); |
545 |
|
} else if (CHK(C_TFLT)) { |
546 |
+ |
TIFFSetField(cvts.tif, TIFFTAG_SAMPLEFORMAT, |
547 |
+ |
SAMPLEFORMAT_IEEEFP); |
548 |
|
cvts.tf = Color2RfGfBf; |
549 |
|
SET(C_RFLT); |
550 |
|
} else |
557 |
|
cvts.tf = Color2GGry; |
558 |
|
SET(C_RFLT); |
559 |
|
} else if (CHK(C_TFLT)) { |
560 |
+ |
TIFFSetField(cvts.tif, TIFFTAG_SAMPLEFORMAT, |
561 |
+ |
SAMPLEFORMAT_IEEEFP); |
562 |
|
cvts.tf = Color2Gryf; |
563 |
|
SET(C_RFLT); |
564 |
|
} else |