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

Comparing ray/src/common/tmaptiff.c (file contents):
Revision 3.9 by greg, Thu Dec 2 18:10:40 2010 UTC vs.
Revision 3.10 by greg, Fri May 20 02:06:38 2011 UTC

# Line 79 | Line 79 | getTIFFtype(TIFF *tif)
79  
80   /* load and convert TIFF */
81   int
82 < tmLoadTIFF(TMstruct *tms, TMbright **lpp, BYTE **cpp,
82 > tmLoadTIFF(TMstruct *tms, TMbright **lpp, uby8 **cpp,
83                  int *xp, int *yp, char *fname, TIFF *tp)
84   {
85          char    *funcName = fname==NULL ? "tmLoadTIFF" : fname;
# Line 173 | Line 173 | tmLoadTIFF(TMstruct *tms, TMbright **lpp, BYTE **cpp,
173          case TC_RGBSHORT:
174                  if (cpp == TM_NOCHROMP)
175                          break;
176 <                *cpp = (BYTE *)malloc(width*height*3*sizeof(BYTE));
176 >                *cpp = (uby8 *)malloc(width*height*3*sizeof(uby8));
177                  if (*cpp == NULL) {
178                          err = TM_E_NOMEM;
179                          goto done;
# Line 252 | Line 252 | done:                                  /* clean up */
252   * As in tmMapPicture(), grey values are also returned if flags&TM_F_BW.
253   */
254   int
255 < tmMapTIFF(BYTE **psp, int *xp, int *yp, int flags, RGBPRIMP monpri,
255 > tmMapTIFF(uby8 **psp, int *xp, int *yp, int flags, RGBPRIMP monpri,
256          double gamval, double Lddyn, double Ldmax, char *fname, TIFF *tp)
257   {
258          char    *funcName = fname==NULL ? "tmMapTIFF" : fname;
259          TMstruct        *tms;
260          TMbright        *lp;
261 <        BYTE    *cp;
261 >        uby8    *cp;
262          int     err;
263                                          /* check arguments */
264          if ((psp == NULL) | (xp == NULL) | (yp == NULL) | (monpri == NULL) |
# Line 280 | Line 280 | tmMapTIFF(BYTE **psp, int *xp, int *yp, int flags, RGB
280                  return(err);
281          }
282          if (cp == TM_NOCHROM) {
283 <                *psp = (BYTE *)malloc(*xp * *yp * sizeof(BYTE));
283 >                *psp = (uby8 *)malloc(*xp * *yp * sizeof(uby8));
284                  if (*psp == NULL) {
285                          free((MEM_PTR)lp);
286                          tmDone(tms);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines