ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rc2.c
(Generate patch)

Comparing ray/src/rt/rc2.c (file contents):
Revision 2.10 by greg, Fri May 30 16:05:52 2014 UTC vs.
Revision 2.11 by greg, Fri Jun 13 01:16:41 2014 UTC

# Line 139 | Line 139 | getostream(const char *ospec, const char *mname, int b
139          char                    oname[1024];
140          LUENT                   *lep;
141          STREAMOUT               *sop;
142 +        char                    *cp;
143          
144          if (ospec == NULL) {                    /* use stdout? */
145                  if (!noopen & !using_stdout) {
146                          if (outfmt != 'a')
147                                  SET_FILE_BINARY(stdout);
148                          if (header) {
149 <                                sprintf(info, "NCOLS=%d\nNCOMP=3\n",
149 >                                cp = info;
150 >                                if (yres > 0) {
151 >                                        sprintf(cp, "NROWS=%d\n", yres *
152 >                                                        (xres + !xres) );
153 >                                        while (*cp) ++cp;
154 >                                }
155 >                                sprintf(cp, "NCOLS=%d\nNCOMP=3\n",
156                                                  stdos.reclen);
157                                  printheader(stdout, info);
158                          }
# Line 198 | Line 205 | getostream(const char *ospec, const char *mname, int b
205   #ifdef getc_unlocked
206                  flockfile(sop->ofp);            /* avoid lock/unlock overhead */
207   #endif
208 +                if (accumulate > 0) {           /* global resolution */
209 +                        sop->xr = xres; sop->yr = yres;
210 +                }
211                  if (header) {
212 <                        char    *cp = info;
212 >                        cp = info;
213                          if (ofl & OF_MODIFIER || sop->reclen == 1) {
214                                  sprintf(cp, "MODIFIER=%s\n", mname);
215                                  while (*cp) ++cp;
# Line 208 | Line 218 | getostream(const char *ospec, const char *mname, int b
218                                  sprintf(cp, "BIN=%d\n", bn);
219                                  while (*cp) ++cp;
220                          }
221 +                        if (sop->yr > 0) {
222 +                                sprintf(cp, "NROWS=%d\n", sop->yr *
223 +                                                (sop->xr + !sop->xr) );
224 +                                while (*cp) ++cp;
225 +                        }
226                          sprintf(cp, "NCOLS=%d\nNCOMP=3\n", sop->reclen);
227                          printheader(sop->ofp, info);
213                }
214                if (accumulate > 0) {           /* global resolution */
215                        sop->xr = xres; sop->yr = yres;
228                  }
229                  printresolu(sop->ofp, sop->xr, sop->yr);
230                  if (waitflush > 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines