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

Comparing ray/src/px/ra_rgbe.c (file contents):
Revision 1.1 by greg, Fri Aug 23 17:37:14 1991 UTC vs.
Revision 2.2 by greg, Fri Jan 3 22:58:08 1992 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 11 | Line 11 | static char SCCSid[] = "$SunId$ LBL";
11   #include  <stdio.h>
12  
13   #include  "color.h"
14 + #include  "resolu.h"
15  
16   int  bradj = 0;                         /* brightness adjustment */
17  
# Line 79 | Line 80 | char  *err;
80   transfer()              /* transfer Radiance picture */
81   {
82          extern double   pow();
83 +        int     order;
84          int     xmax, ymax;
85          COLR    *scanin;
86          register int    x;
87          int     y;
88                                  /* get header info. */
89          if (checkheader(stdin, COLRFMT, stdout) < 0 ||
90 <                        fgetresolu(&xmax, &ymax, stdin) != (YMAJOR|YDECR))
90 >                        (order = fgetresolu(&xmax, &ymax, stdin)) < 0)
91                  quiterr("bad picture format");
92 +        fputs(progname, stdout);
93          if (bradj)
94 <                fputexpos(pow(2.0, (double)bradj), stdout);
95 <        if (!doflat) {
94 >                printf(" -e %+d", bradj);
95 >        if (doflat)
96 >                fputs("\n", stdout);
97 >        else {
98 >                fputs(" -r\n", stdout);
99                  fputformat(COLRFMT, stdout);
100 <                printf("%s -r\n\n", progname);
101 <        } else
102 <                printf("%s\n\n", progname);
103 <        fputresolu(YMAJOR|YDECR, xmax, ymax, stdout);
100 >        }
101 >        if (bradj)
102 >                fputexpos(pow(2.0, (double)bradj), stdout);
103 >        fputs("\n", stdout);
104 >        fputresolu(order, xmax, ymax, stdout);
105                                                  /* allocate scanline */
106          scanin = (COLR *)malloc(xmax*sizeof(COLR));
107          if (scanin == NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines