--- ray/src/common/tonemap.c 2005/01/07 21:41:06 3.17 +++ ray/src/common/tonemap.c 2005/01/07 22:05:30 3.18 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: tonemap.c,v 3.17 2005/01/07 21:41:06 greg Exp $"; +static const char RCSid[] = "$Id: tonemap.c,v 3.18 2005/01/07 22:05:30 greg Exp $"; #endif /* * Tone mapping functions. @@ -68,6 +68,7 @@ double gamval tmnew->inpsf = WHTEFFICACY; tmnew->cmat[0][1] = tmnew->cmat[0][2] = tmnew->cmat[1][0] = tmnew->cmat[1][2] = tmnew->cmat[2][0] = tmnew->cmat[2][1] = 0.; + tmnew->inpdat = NULL; tmnew->hbrmin = 10; tmnew->hbrmax = -10; tmnew->histo = NULL; tmnew->mbrmin = 10; tmnew->mbrmax = -10; @@ -86,7 +87,8 @@ int tmSetSpace( /* set input color space for conversions */ TMstruct *tms, RGBPRIMP pri, -double sf +double sf, +MEM_PTR dat ) { static const char funcName[] = "tmSetSpace"; @@ -97,10 +99,11 @@ double sf if (sf <= 1e-12) returnErr(TM_E_ILLEGAL); /* check if no change */ - if (pri == tms->inppri && FEQ(sf, tms->inpsf)) + if (pri == tms->inppri && FEQ(sf, tms->inpsf) && dat == tms->inpdat) returnOK; tms->inppri = pri; /* let's set it */ tms->inpsf = sf; + tms->inpdat = dat; if (tms->flags & TM_F_BW) { /* color doesn't matter */ tms->monpri = tms->inppri; /* eliminate xform */