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

Comparing ray/src/rt/data.c (file contents):
Revision 1.6 by greg, Fri Apr 6 14:12:21 1990 UTC vs.
Revision 1.7 by greg, Tue May 8 10:37:57 1990 UTC

# Line 174 | Line 174 | char  *pname;
174                  goto readerr;
175          for (i = 0; i < 3; i++) {
176                  pp[i].nd = 2;
177 <                pp[i].dim[0].ne = width;
178 <                pp[i].dim[1].ne = height;
177 >                pp[i].dim[0].ne = height;
178 >                pp[i].dim[1].ne = width;
179                  pp[i].dim[0].org =
180                  pp[i].dim[1].org = 0.0;
181                  if (width <= height*inpaspect) {
182 <                        pp[i].dim[0].siz = 1.0;
183 <                        pp[i].dim[1].siz = inpaspect*(double)height/width;
184 <                } else {
185 <                        pp[i].dim[0].siz = (double)width/height/inpaspect;
182 >                        pp[i].dim[0].siz = inpaspect*(double)height/width;
183                          pp[i].dim[1].siz = 1.0;
184 +                } else {
185 +                        pp[i].dim[0].siz = 1.0;
186 +                        pp[i].dim[1].siz = (double)width/height/inpaspect;
187                  }
188 +                pp[i].dim[0].p = pp[i].dim[1].p = NULL;
189                  pp[i].arr = (DATATYPE *)malloc(width*height*sizeof(DATATYPE));
190                  if (pp[i].arr == NULL)
191                          goto memerr;
# Line 197 | Line 198 | char  *pname;
198                          goto readerr;
199                  for (x = 0; x < width; x++)
200                          for (i = 0; i < 3; i++)
201 <                                pp[i].arr[x*height+y] = colval(scanin[x],i);
201 >                                pp[i].arr[y*width+x] = colval(scanin[x],i);
202          }
203          free((char *)scanin);
204          fclose(fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines