1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
4 |
– |
|
5 |
– |
/* Copyright 1989 Regents of the University of California */ |
6 |
– |
|
7 |
– |
#ifndef lint |
8 |
– |
static char SCCSid[] = "@(#)ra_pixar.c 1.2 9/12/89 LBL"; |
9 |
– |
#endif |
10 |
– |
|
4 |
|
/* ra_pixar.c */ |
5 |
|
/* |
6 |
|
* convert from RADIANCE image file to PIXAR image file. (or vice versa) |
19 |
|
|
20 |
|
#include <stdio.h> |
21 |
|
#include <math.h> |
22 |
+ |
#include <time.h> |
23 |
|
|
24 |
|
/* PIXAR */ |
25 |
|
#include <picio.h> |
30 |
|
#ifdef undef |
31 |
|
#include "color.h" |
32 |
|
#else |
39 |
– |
#define XDECR 1 |
40 |
– |
#define YDECR 2 |
41 |
– |
#define YMAJOR 4 |
42 |
– |
|
33 |
|
#define RED 0 |
34 |
|
#define GRN 1 |
35 |
|
#define BLU 2 |
39 |
|
((col)[RED]=(r),(col)[GRN]=(g),(col)[BLU]=(b)) |
40 |
|
typedef float COLOR[3]; /* red, green, blue */ |
41 |
|
#endif |
42 |
+ |
#include "resolu.h" |
43 |
|
|
44 |
|
|
45 |
|
char *ProgramName; |
161 |
|
exit(1); |
162 |
|
} |
163 |
|
getheader(radiance_fp,NULL); |
164 |
< |
if (fgetresolu(w, h, radiance_fp) != (YMAJOR|YDECR)) |
164 |
> |
if (fgetresolu(w, h, radiance_fp) < 0) |
165 |
|
{ |
166 |
|
fprintf(stderr,"bad RADIANCE format\n"); |
167 |
|
exit(1); |
268 |
|
{ |
269 |
|
printargs(global_argc,global_argv,fp); |
270 |
|
fputc('\n',fp); |
271 |
< |
fputresolu(YMAJOR|YDECR, x, y, fp); |
271 |
> |
fprtresolu(x, y, fp); |
272 |
|
fflush(fp); |
273 |
|
} |
274 |
|
|