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

Comparing ray/src/px/ra_pixar.c (file contents):
Revision 1.1 by greg, Mon Jul 24 08:42:56 1989 UTC vs.
Revision 2.4 by schorsch, Fri Jan 2 10:25:13 2004 UTC

# Line 1 | Line 1
1 /* Copyright 1989 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /* ra_pixar.c */
5   /*
6   * convert from RADIANCE image file to PIXAR image file.  (or vice versa)
# Line 21 | Line 18 | static char SCCSid[] = "$SunId$ LBL";
18   */
19  
20   #include <stdio.h>
21 + #include <string.h>
22   #include <math.h>
23 + #include  <time.h>
24  
25   /* PIXAR */
26   #include <picio.h>
# Line 41 | Line 40 | static char SCCSid[] = "$SunId$ LBL";
40          ((col)[RED]=(r),(col)[GRN]=(g),(col)[BLU]=(b))
41   typedef float  COLOR[3];        /* red, green, blue */
42   #endif
43 + #include "resolu.h"
44  
45  
46   char                    *ProgramName;
# Line 114 | Line 114 | char                   *outfile;
114        perror("malloc");
115        exit(1);
116     }
117 <   bzero(pixar_scanline,width*sizeof(RGBAPixelType));
117 >   memset(pixar_scanline, '\0', width*sizeof(RGBAPixelType));
118  
119     PicSetForce(1);
120     PicSetPsize(width,height);
# Line 161 | Line 161 | int            *h;
161        perror("open");
162        exit(1);
163     }
164 <   getheader(radiance_fp,NULL);
165 <   if (fscanf(radiance_fp,"-Y %d +X %d\n",h,w) != 2)
164 >   getheader(radiance_fp,NULL,NULL);
165 >   if (fgetresolu(w, h, radiance_fp) < 0)
166     {
167        fprintf(stderr,"bad RADIANCE format\n");
168        exit(1);
# Line 269 | Line 269 | int            y;
269   {
270     printargs(global_argc,global_argv,fp);
271     fputc('\n',fp);
272 <   fprintf(fp,"-Y %d +X %d\n",y,x);
272 >   fprtresolu(x, y, fp);
273     fflush(fp);
274   }
275  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines