78 |
|
|
79 |
|
#ifdef NOPROTO |
80 |
|
|
81 |
< |
extern struct tmStruct *tmInit(), *tmPop(); |
81 |
> |
extern struct tmStruct *tmInit(), *tmPop(), *tmDup(); |
82 |
|
extern void tmClearHisto(), tmDone(); |
83 |
|
extern int tmSetSpace(), tmCvColors(), tmCvColrs(); |
84 |
|
extern int tmAddHisto(), tmComputeMapping(), tmMapPixels(); |
183 |
|
char *fname, FILE *fp); |
184 |
|
/* |
185 |
|
Load Radiance picture and convert to tone mapping representation. |
186 |
+ |
Calls tmSetSpace() to calibrate input color space. |
187 |
|
|
188 |
|
lpp - returned array of encoded luminances, English ordering. |
189 |
|
cpp - returned array of encoded chrominances (Note 2). |
246 |
|
returns - 0 on success, TM_E_* if tms is invalid. |
247 |
|
*/ |
248 |
|
|
249 |
+ |
extern struct tmStruct * |
250 |
+ |
tmDup(void); |
251 |
+ |
/* |
252 |
+ |
Duplicate the current tone mapping into a new structure on the stack. |
253 |
+ |
|
254 |
+ |
returns - pointer to new top, or NULL on error. |
255 |
+ |
*/ |
256 |
+ |
|
257 |
|
extern void |
258 |
|
tmDone(struct tmStruct *tms); |
259 |
|
/* |
289 |
|
used during final mapping, setting the cs parameter to TM_NOCHROM |
290 |
|
on the first pass will save time.) Another memory saving option |
291 |
|
if third and subsequent passes are not needed is to use the |
292 |
< |
same array to store the mapped pixels as is used to store |
292 |
> |
same array to store the mapped pixels as used to store |
293 |
|
the encoded chroma values. This way, only two extra bytes |
294 |
|
for storing encoded luminances are required per pixel. This |
295 |
|
is the method employed by tmMapPicture(), for example. |