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