1 |
+ |
/* Copyright (c) 1991 Regents of the University of California */ |
2 |
+ |
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
5 |
|
#endif |
6 |
|
|
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 |
– |
|
7 |
|
/* ra_pixar.c */ |
8 |
|
/* |
9 |
|
* convert from RADIANCE image file to PIXAR image file. (or vice versa) |
32 |
|
#ifdef undef |
33 |
|
#include "color.h" |
34 |
|
#else |
39 |
– |
#define XDECR 1 |
40 |
– |
#define YDECR 2 |
41 |
– |
#define YMAJOR 4 |
42 |
– |
|
35 |
|
#define RED 0 |
36 |
|
#define GRN 1 |
37 |
|
#define BLU 2 |
41 |
|
((col)[RED]=(r),(col)[GRN]=(g),(col)[BLU]=(b)) |
42 |
|
typedef float COLOR[3]; /* red, green, blue */ |
43 |
|
#endif |
44 |
+ |
#include "resolu.h" |
45 |
|
|
46 |
|
|
47 |
|
char *ProgramName; |
163 |
|
exit(1); |
164 |
|
} |
165 |
|
getheader(radiance_fp,NULL); |
166 |
< |
if (fgetresolu(w, h, radiance_fp) != (YMAJOR|YDECR)) |
166 |
> |
if (fgetresolu(w, h, radiance_fp) < 0) |
167 |
|
{ |
168 |
|
fprintf(stderr,"bad RADIANCE format\n"); |
169 |
|
exit(1); |
270 |
|
{ |
271 |
|
printargs(global_argc,global_argv,fp); |
272 |
|
fputc('\n',fp); |
273 |
< |
fputresolu(YMAJOR|YDECR, x, y, fp); |
273 |
> |
fprtresolu(x, y, fp); |
274 |
|
fflush(fp); |
275 |
|
} |
276 |
|
|