1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ AU"; |
2 |
> |
static char SCCSid[] = "$SunId$ LBL"; |
3 |
|
#endif |
4 |
+ |
|
5 |
|
/* |
6 |
|
rad2pict - Convert an Radiance image to APPLE pict format. |
7 |
|
|
9 |
|
Auckland, New Zealand |
10 |
|
*/ |
11 |
|
#include <stdio.h> |
11 |
– |
#include <stdlib.h> |
12 |
|
#include "pict.h" |
13 |
|
#include "color.h" |
14 |
+ |
#include "resolu.h" |
15 |
|
|
16 |
+ |
extern char *malloc(); |
17 |
+ |
|
18 |
|
char cbuf[8192*5]; |
19 |
|
char pbuf[8192]; |
20 |
|
int outbytes; |
21 |
|
FILE *outf, *inf; |
22 |
|
char **gargv; |
23 |
|
|
21 |
– |
putpic(int, int); |
22 |
– |
|
24 |
|
putrect(xorg,yorg,xsize,ysize) |
25 |
|
int xorg, yorg, xsize, ysize; |
26 |
|
{ |
105 |
|
} |
106 |
|
|
107 |
|
if (checkheader(inf, COLRFMT, NULL) < 0 || |
108 |
< |
fgetresolu(&xsize, &ysize, inf) != (YMAJOR|YDECR)) { |
108 |
> |
fgetresolu(&xsize, &ysize, inf) < 0) { |
109 |
|
fprintf(stderr, "%s: not a radiance picture\n", argv[1]); |
110 |
|
exit(1); |
111 |
|
} |
194 |
|
putbyte(0); |
195 |
|
} |
196 |
|
|
197 |
< |
int getrow(FILE *in, char *mybuff, int xsize) |
197 |
> |
int |
198 |
> |
getrow(in, mybuff, xsize) |
199 |
> |
FILE *in; |
200 |
> |
char *mybuff; |
201 |
> |
int xsize; |
202 |
|
{ |
203 |
|
COLOR color; |
204 |
|
COLR *scanin = (COLR*) malloc(xsize * sizeof(COLR)); |