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

Comparing ray/src/px/pextrem.c (file contents):
Revision 2.10 by schorsch, Sun Mar 28 20:33:14 2004 UTC vs.
Revision 2.14 by greg, Fri Jul 19 17:37:56 2019 UTC

# Line 5 | Line 5 | static const char      RCSid[] = "$Id$";
5   * Find extrema points in a Radiance picture.
6   */
7  
8 #include  <stdio.h>
8   #include  <math.h>
10 #include  <string.h>
9  
10 + #include  "rtio.h"
11   #include  "platform.h"
12   #include  "color.h"
13   #include  "resolu.h"
# Line 29 | Line 28 | headline(                      /* check header line */
28          void    *p
29   )
30   {
31 <        char    fmt[32];
31 >        char    fmt[MAXFMTLEN];
32          double  d;
33          COLOR   ctmp;
34  
# Line 86 | Line 85 | main(
85                  fprintf(stderr, "%s: out of memory\n", argv[0]);
86                  exit(1);
87          }
88 <        setcolr(cmin, 1e10, 1e10, 1e10);
89 <        setcolr(cmax, 0., 0., 0.);
88 >        setcolr(cmin, 1e30, 1e30, 1e30);
89 >        setcolr(cmax, 0., 0., 0.); xmax=ymax=0;
90                                          /* find extrema */
91          for (y = yres-1; y >= 0; y--) {
92                  if (freadcolrs(scan, xres, stdin) < 0) {
# Line 112 | Line 111 | main(
111                  }
112          }
113          free((void *)scan);
114 <        printf("%d %d\t%e %e %e\n", xmin, ymin,
114 >        printf("%d %d\t%.2e %.2e %.2e\n", xmin, ymin,
115                          colrval(cmin,RED)/colval(expos,RED),
116                          colrval(cmin,GRN)/colval(expos,GRN),
117                          colrval(cmin,BLU)/colval(expos,BLU));
118 <        printf("%d %d\t%e %e %e\n", xmax, ymax,
118 >        printf("%d %d\t%.2e %.2e %.2e\n", xmax, ymax,
119                          colrval(cmax,RED)/colval(expos,RED),
120                          colrval(cmax,GRN)/colval(expos,GRN),
121                          colrval(cmax,BLU)/colval(expos,BLU));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines