58 |
|
#endif |
59 |
|
|
60 |
|
extern char *tmErrorMessage[]; /* error messages */ |
61 |
+ |
extern int tmLastError; /* last error incurred by library */ |
62 |
+ |
extern char *tmLastFunction; /* error-generating function name */ |
63 |
|
|
64 |
|
typedef short TMbright; /* encoded luminance type */ |
65 |
|
|
224 |
|
char *fname, FILE *fp); |
225 |
|
/* |
226 |
|
Load Radiance picture and convert to tone mapping representation. |
227 |
+ |
Memory for the luminance and chroma arrays is allocated using |
228 |
+ |
malloc(3), and should be freed with free(3) when no longer needed. |
229 |
|
Calls tmSetSpace() to calibrate input color space. |
230 |
|
|
231 |
|
lpp - returned array of encoded luminances, English ordering. |
247 |
|
If fp is TM_GETFILE and (flags&TM_F_UNIMPL)!=0, tmMapPicture() |
248 |
|
calls pcond to perform the actual conversion, which takes |
249 |
|
longer but gives access to all the TM_F_* features. |
250 |
+ |
Memory for the final pixel array is allocated using malloc(3), |
251 |
+ |
and should be freed with free(3) when it is no longer needed. |
252 |
|
|
253 |
|
psp - returned array of tone mapped pixels, English ordering. |
254 |
|
xp, yp - returned picture dimensions. |
322 |
|
pixel values to chroma and luminance encodings, which can |
323 |
|
be passed to tmAddHisto() to put into the tone mapping histogram. |
324 |
|
This histogram is then used along with the display parameters |
325 |
< |
by tmComputMapping() to compute the luminance mapping function. |
325 |
> |
by tmComputeMapping() to compute the luminance mapping function. |
326 |
|
(Colors are tone-mapped as they are converted if TM_F_MESOPIC |
327 |
|
is set.) The encoded chroma and luminance values may then be |
328 |
|
passed to tmMapPixels() to apply the computed tone mapping in |