52 |
|
headline(char *s, void *p) |
53 |
|
{ |
54 |
|
IMGHEAD *ip = (IMGHEAD *)p; |
55 |
< |
char fmt[32]; |
55 |
> |
char fmt[MAXFMTLEN]; |
56 |
|
|
57 |
|
if (isview(s)) { |
58 |
|
ip->gotview += (sscanview(ip->vp, s) > 0); |
132 |
|
goto readerr; |
133 |
|
fclose(fp); |
134 |
|
sprintf(fname, zbfspec, fno); /* load depth buffer */ |
135 |
< |
if ((fd = open(fname, O_RDONLY)) < 0) { |
135 |
> |
if ((fd = open_float_depth(fname, (long)rs.xr*rs.yr)) < 0) { |
136 |
|
sprintf(errmsg, "cannot open depth buffer \"%s\"", fname); |
137 |
|
error(SYSTEM, errmsg); |
138 |
|
} |
207 |
|
} |
208 |
|
|
209 |
|
|
210 |
< |
/* Fill in missing pixels from immediate neighbors */ |
210 |
> |
/* Expand foreground pixels to mitigate aliasing/fill errors */ |
211 |
|
static void |
212 |
|
fill_missing(void) |
213 |
|
{ |
214 |
|
int n, m; |
215 |
|
|
216 |
|
for (n = imres.xr*imres.yr; n--; ) |
217 |
< |
if (zbuf[n] >= .9*FHUGE && |
218 |
< |
zbuf[m = neigh_zmin(zbuf,n)] < .9*FHUGE) |
217 |
> |
if (zbuf[n] > 1.25*zbuf[m = neigh_zmin(zbuf,n)]) |
218 |
|
copycolor(imbuf[n], imbuf[m]); |
219 |
|
} |
220 |
|
|