| 26 |
|
int i, y; |
| 27 |
|
|
| 28 |
|
if (cv->ncols != 1) |
| 29 |
< |
error(INTERNAL, "expected matrix in sum_images()"); |
| 29 |
> |
error(INTERNAL, "expected vector in sum_images()"); |
| 30 |
|
for (i = 0; i < cv->nrows; i++) { |
| 31 |
|
const COLORV *scv = cv_lval(cv,i); |
| 32 |
|
char fname[1024]; |
| 185 |
|
CMATRIX *smtx, *Dmat, *Tmat, *imtx; |
| 186 |
|
/* get sky vector/matrix */ |
| 187 |
|
smtx = cm_load(argv[a+3], 0, nsteps, skyfmt); |
| 188 |
+ |
nsteps = smtx->ncols; |
| 189 |
|
/* load BSDF */ |
| 190 |
|
Tmat = cm_loadBTDF(argv[a+1]); |
| 191 |
|
/* load Daylight matrix */ |
| 199 |
|
cm_free(imtx); |
| 200 |
|
} else { /* sky vector/matrix only */ |
| 201 |
|
cmtx = cm_load(argv[a+1], 0, nsteps, skyfmt); |
| 202 |
+ |
nsteps = cmtx->ncols; |
| 203 |
|
} |
| 204 |
|
/* prepare output stream */ |
| 205 |
|
if ((ofspec != NULL) & (nsteps == 1) && hasNumberFormat(ofspec)) { |