| 122 |
|
return 0; |
| 123 |
|
} |
| 124 |
|
dcp->gotview *= (dcp->gotview > 0); |
| 125 |
+ |
/* get resolution string? */ |
| 126 |
+ |
if (dcp->hdrflags & HF_RESIN && !fgetsresolu(&dcp->res, dcp->finp)) { |
| 127 |
+ |
if (dcp->hdrflags & HF_STDERR) { |
| 128 |
+ |
fputs(dcp->inpname, stderr); |
| 129 |
+ |
fputs(": bad resolution string\n", stderr); |
| 130 |
+ |
} |
| 131 |
+ |
return 0; |
| 132 |
+ |
} |
| 133 |
|
if (dcp->hdrflags & HF_HEADOUT) { /* finish header */ |
| 134 |
|
if (!(dcp->hdrflags & HF_HEADIN)) |
| 135 |
|
newheader("RADIANCE", stdout); |
| 140 |
|
fputs(dcp->depth_unit, stdout); |
| 141 |
|
fputc('\n', stdout); |
| 142 |
|
fputformat(DEPTH16FMT, stdout); |
| 143 |
< |
} else |
| 143 |
> |
} else { |
| 144 |
> |
fputs("NCOMP=1\n", stdout); |
| 145 |
> |
if ((dcp->hdrflags & (HF_RESIN|HF_RESOUT)) == HF_RESIN) |
| 146 |
> |
printf("NCOLS=%d\nNROWS=%d\n", |
| 147 |
> |
scanlen(&dcp->res), |
| 148 |
> |
numscans(&dcp->res)); |
| 149 |
|
switch (dcp->format) { |
| 150 |
|
case 'a': |
| 151 |
|
fputformat("ascii", stdout); |
| 159 |
|
fputformat("double", stdout); |
| 160 |
|
break; |
| 161 |
|
} |
| 162 |
+ |
} |
| 163 |
|
fputc('\n', stdout); |
| 164 |
|
} |
| 165 |
< |
/* get/put resolution string */ |
| 152 |
< |
if (dcp->hdrflags & HF_RESIN && !fgetsresolu(&dcp->res, dcp->finp)) { |
| 153 |
< |
if (dcp->hdrflags & HF_STDERR) { |
| 154 |
< |
fputs(dcp->inpname, stderr); |
| 155 |
< |
fputs(": bad resolution string\n", stderr); |
| 156 |
< |
} |
| 157 |
< |
return 0; |
| 158 |
< |
} |
| 159 |
< |
if (dcp->hdrflags & HF_RESOUT) |
| 165 |
> |
if (dcp->hdrflags & HF_RESOUT) /* put resolution string? */ |
| 166 |
|
fputsresolu(&dcp->res, stdout); |
| 167 |
|
|
| 168 |
|
dcp->dstart = dcp->curpos = ftell(dcp->finp); |