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

Comparing ray/src/meta/meta2bmp.c (file contents):
Revision 1.2 by schorsch, Mon Sep 19 12:48:09 2005 UTC vs.
Revision 1.4 by greg, Mon Nov 18 22:12:32 2019 UTC

# Line 14 | Line 14 | static const char RCSid[] = "$Id$";
14   #include  "bmpfile.h"
15   #include  "targa.h"
16  
17 < #define  MAXALLOC  30000
17 > #define  MAXALLOC  100000
18   #define  DXSIZE  400            /* default x resolution */
19   #define  DYSIZE  400            /* default y resolution */
20   #define  XCOM  "pexpand +vOCImsp -DP %s | psort +y"
# Line 24 | Line 24 | char  *progname;
24  
25   SCANBLOCK       outblock;
26  
27 < int  dxsize = DXSIZE, dysize = DYSIZE;
27 > int  dxsiz = DXSIZE, dysiz = DYSIZE;
28  
29   int  maxalloc = MAXALLOC;
30  
# Line 82 | Line 82 | main(
82            argc--;
83            break;
84         case 'x':
85 <          dxsize = atoi(*++argv);
85 >          dxsiz = atoi(*++argv);
86            argc--;
87            break;
88         case 'y':
89 <          dysize = atoi(*++argv);
89 >          dysiz = atoi(*++argv);
90            argc--;
91            break;
92         case 'o':
# Line 162 | Line 162 | initfile(void)         /* initialize this file */
162      BMPHeader  *hp;
163      register int  i;
164  
165 <    hp = BMPmappedHeader(dxsize, dysize, 0, 256);
165 >    hp = BMPmappedHeader(dxsiz, dysiz, 0, 256);
166      hp->compr = BI_RLE8;
167      if (hp == NULL)
168          error(USER, "Illegal image parameter(s)");
# Line 192 | Line 192 | nextpage(void)         /* advance to next page */
192      if (lineno == 0)
193          return;
194      if (bmpw != NULL) {
195 <        while (lineno < dysize) {
195 >        while (lineno < dysiz) {
196              nextblock();
197              outputblock();
198          }
# Line 216 | Line 216 | printblock(void)               /* output scanline block to file */
216  
217      if (lineno == 0)
218          initfile();
219 <    for (i = outblock.ybot; i <= outblock.ytop && i < dysize; i++) {
219 >    for (i = outblock.ybot; i <= outblock.ytop && i < dysiz; i++) {
220          scanline = outblock.cols[i-outblock.ybot] + outblock.xleft;
221          memcpy((void *)bmpw->scanline, (void *)scanline,
222                          sizeof(uint8)*(outblock.xright-outblock.xleft+1));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines