Linux server.nvwebsoft.co.in 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
Apache
: 162.240.12.249 | : 3.148.117.240
202 Domain
8.1.31
nbspublicschool
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
libtiff-devel-4.0.3 /
html /
man /
[ HOME SHELL ]
Name
Size
Permission
Action
TIFFClose.3tiff.html
2.42
KB
-rw-r--r--
TIFFDataWidth.3tiff.html
2.5
KB
-rw-r--r--
TIFFError.3tiff.html
3.17
KB
-rw-r--r--
TIFFFieldDataType.3tiff.html
2.13
KB
-rw-r--r--
TIFFFieldName.3tiff.html
2.08
KB
-rw-r--r--
TIFFFieldPassCount.3tiff.html
2.55
KB
-rw-r--r--
TIFFFieldReadCount.3tiff.html
2.75
KB
-rw-r--r--
TIFFFieldTag.3tiff.html
2.2
KB
-rw-r--r--
TIFFFieldWriteCount.3tiff.html
3.07
KB
-rw-r--r--
TIFFFlush.3tiff.html
3.27
KB
-rw-r--r--
TIFFGetField.3tiff.html
32.67
KB
-rw-r--r--
TIFFOpen.3tiff.html
13.38
KB
-rw-r--r--
TIFFPrintDirectory.3tiff.html
4.62
KB
-rw-r--r--
TIFFRGBAImage.3tiff.html
12.02
KB
-rw-r--r--
TIFFReadDirectory.3tiff.html
7.91
KB
-rw-r--r--
TIFFReadEncodedStrip.3tiff.htm...
4.2
KB
-rw-r--r--
TIFFReadEncodedTile.3tiff.html
4.04
KB
-rw-r--r--
TIFFReadRGBAImage.3tiff.html
10.24
KB
-rw-r--r--
TIFFReadRGBAStrip.3tiff.html
7.31
KB
-rw-r--r--
TIFFReadRGBATile.3tiff.html
8.28
KB
-rw-r--r--
TIFFReadRawStrip.3tiff.html
3.26
KB
-rw-r--r--
TIFFReadRawTile.3tiff.html
3.34
KB
-rw-r--r--
TIFFReadScanline.3tiff.html
5.13
KB
-rw-r--r--
TIFFReadTile.3tiff.html
4.18
KB
-rw-r--r--
TIFFSetDirectory.3tiff.html
3.74
KB
-rw-r--r--
TIFFSetField.3tiff.html
30.36
KB
-rw-r--r--
TIFFWarning.3tiff.html
3.27
KB
-rw-r--r--
TIFFWriteDirectory.3tiff.html
6.33
KB
-rw-r--r--
TIFFWriteEncodedStrip.3tiff.ht...
4.97
KB
-rw-r--r--
TIFFWriteEncodedTile.3tiff.htm...
4.78
KB
-rw-r--r--
TIFFWriteRawStrip.3tiff.html
4.41
KB
-rw-r--r--
TIFFWriteRawTile.3tiff.html
3.88
KB
-rw-r--r--
TIFFWriteScanline.3tiff.html
7.21
KB
-rw-r--r--
TIFFWriteTile.3tiff.html
3.55
KB
-rw-r--r--
TIFFbuffer.3tiff.html
3.79
KB
-rw-r--r--
TIFFcodec.3tiff.html
3.61
KB
-rw-r--r--
TIFFcolor.3tiff.html
22.23
KB
-rw-r--r--
TIFFmemory.3tiff.html
3.49
KB
-rw-r--r--
TIFFquery.3tiff.html
5.04
KB
-rw-r--r--
TIFFsize.3tiff.html
2.68
KB
-rw-r--r--
TIFFstrip.3tiff.html
4.25
KB
-rw-r--r--
TIFFswab.3tiff.html
3.41
KB
-rw-r--r--
TIFFtile.3tiff.html
4.9
KB
-rw-r--r--
bmp2tiff.1.html
3.49
KB
-rw-r--r--
fax2ps.1.html
7.56
KB
-rw-r--r--
fax2tiff.1.html
14.37
KB
-rw-r--r--
gif2tiff.1.html
3.8
KB
-rw-r--r--
index.html
3.7
KB
-rw-r--r--
libtiff.3tiff.html
24
KB
-rw-r--r--
pal2rgb.1.html
5.12
KB
-rw-r--r--
ppm2tiff.1.html
3.89
KB
-rw-r--r--
ras2tiff.1.html
3.96
KB
-rw-r--r--
raw2tiff.1.html
12.45
KB
-rw-r--r--
rgb2ycbcr.1.html
4.14
KB
-rw-r--r--
thumbnail.1.html
3.97
KB
-rw-r--r--
tiff2bw.1.html
3.96
KB
-rw-r--r--
tiff2pdf.1.html
17.52
KB
-rw-r--r--
tiff2ps.1.html
12.77
KB
-rw-r--r--
tiff2rgba.1.html
4.48
KB
-rw-r--r--
tiffcmp.1.html
4.3
KB
-rw-r--r--
tiffcp.1.html
14.98
KB
-rw-r--r--
tiffcrop.1.html
19.92
KB
-rw-r--r--
tiffdither.1.html
5.43
KB
-rw-r--r--
tiffdump.1.html
4.31
KB
-rw-r--r--
tiffinfo.1.html
4.35
KB
-rw-r--r--
tiffmedian.1.html
5.03
KB
-rw-r--r--
tiffset.1.html
4.8
KB
-rw-r--r--
tiffsplit.1.html
2.86
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : TIFFcolor.3tiff.html
<!-- Creator : groff version 1.18.1 --> <!-- CreationDate: Sat Feb 24 18:37:16 2007 --> <html> <head> <meta name="generator" content="groff -Thtml, see www.gnu.org"> <meta name="Content-Style" content="text/css"> <title>COLOR</title> </head> <body> <h1 align=center>COLOR</h1> <a href="#NAME">NAME</a><br> <a href="#SYNOPSIS">SYNOPSIS</a><br> <a href="#DESCRIPTION">DESCRIPTION</a><br> <a href="#SEE ALSO">SEE ALSO</a><br> <hr> <a name="NAME"></a> <h2>NAME</h2> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="8%"></td> <td width="91%"> <p>TIFFYCbCrToRGBInit, TIFFYCbCrtoRGB, TIFFCIELabToRGBInit, TIFFCIELabToXYZ, TIFFXYZToRGB − color conversion routines.</p> </td> </table> <a name="SYNOPSIS"></a> <h2>SYNOPSIS</h2> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="8%"></td> <td width="91%"> <p><b>#include <tiffio.h></b></p> <!-- INDENTATION --> <p><b>int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *</b><i>ycbcr</i><b>, float *</b><i>luma</i><b>, float *</b><i>refBlackWhite"</i><b>);"<br> void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *</b><i>ycbcr</i><b>, uint32</b> <i>Y</i><b>, int32</b> <i>Cb</i><b>, int32</b> <i>Cr</i><b>, uint32 *</b><i>R</i><b>, uint32 *</b><i>G</i><b>, uint32 *</b><i>B</i> <b>);</b></p> <!-- INDENTATION --> <p><b>int TIFFCIELabToRGBInit(TIFFCIELabToRGB *</b><i>cielab</i><b>, TIFFDisplay *</b><i>display</i><b>, float *</b><i>refWhite</i><b>);<br> void TIFFCIELabToXYZ(TIFFCIELabToRGB *</b><i>cielab</i><b>, uint32</b> <i>L</i><b>, int32</b> <i>a</i><b>, int32</b> <i>b</i><b>, float *</b><i>X</i><b>, float *</b><i>Y</i><b>, float *</b><i>Z</i><b>);<br> void TIFFXYZToRGB(TIFFCIELabToRGB *</b><i>cielab</i><b>, float</b> <i>X</i><b>, float</b> <i>Y</i><b>, float</b> <i>Z"</i><b>,</b><i>uint32</i><b>*"</b><i>R</i><b>, uint32 *</b><i>G</i><b>, uint32 *</b><i>B</i><b>);</b></p> </td> </table> <a name="DESCRIPTION"></a> <h2>DESCRIPTION</h2> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="8%"></td> <td width="91%"> <p>TIFF supports several color spaces for images stored in that format. There is usually a problem of application to handle the data properly and convert between different colorspaces for displaying and printing purposes. To simplify this task libtiff implements several color conversion routines itself. In particular, these routines used in <b>TIFFRGBAImage(3TIFF)</b> interface.</p> <!-- INDENTATION --> <p><b>TIFFYCbCrToRGBInit()</b> used to initialize <i>YCbCr</i> to <i>RGB</i> conversion state. Allocating and freeing of the <i>ycbcr</i> structure belongs to programmer. <i>TIFFYCbCrToRGB</i> defined in <b>tiffio.h</b> as</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <pre>typedef struct { /* YCbCr->RGB support */ TIFFRGBValue* clamptab; /* range clamping table */ </pre> </td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="5" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <p>int*</p> <td width="28%"></td> <td width="-3%"></td> <td width="12%"></td> <td width="6%"> <p>Cr_r_tab;<br> int*</p> </td> <td width="56%"> </td> <tr valign="top" align="left"> <td width="28%"></td> <td width="-3%"></td> <td width="12%"></td> <td width="6%"> <p>Cb_b_tab;<br> int32*</p> </td> <td width="56%"> </td> <tr valign="top" align="left"> <td width="28%"></td> <td width="-3%"></td> <td width="12%"></td> <td width="6%"> <p>Cr_g_tab;<br> int32*</p> </td> <td width="56%"> </td> <tr valign="top" align="left"> <td width="28%"></td> <td width="-3%"></td> <td width="12%"></td> <td width="6%"> <p>Cb_g_tab;</p> </td> <td width="56%"> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>int32* Y_tab;<br> } TIFFYCbCrToRGB;</p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="8%"></td> <td width="91%"> <p><i>luma</i> is a float array of three values representing proportions of the red, green and blue in luminance, Y (see section 21 of the TIFF 6.0 specification, where the YCbCr images discussed). <i>TIFFTAG_YCBCRCOEFFICIENTS</i> holds that values in TIFF file. <i>refBlackWhite</i> is a float array of 6 values which specifies a pair of headroom and footroom image data values (codes) for each image component (see section 20 of the TIFF 6.0 specification where the colorinmetry fields discussed). <i>TIFFTAG_REFERENCEBLACKWHITE</i> is responsible for storing these values in TIFF file. Following code snippet should helps to understand the the technique:</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <pre>float *luma, *refBlackWhite; uint16 hs, vs; /* Initialize structures */ ycbcr = (TIFFYCbCrToRGB*) </pre> </td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>_TIFFmalloc(TIFFroundup(sizeof(TIFFYCbCrToRGB), sizeof(long))</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>+ 4*256*sizeof(TIFFRGBValue)</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>+ 2*256*sizeof(int)</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>+ 3*256*sizeof(int32));</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>if (ycbcr == NULL) {<br> TIFFError("YCbCr->RGB",</p></td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="4" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="6%"> </td> <td width="6%"> <p>"No space for YCbCr->RGB conversion state");</p> </td> <td width="62%"> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>exit(0);<br> }</p> <!-- INDENTATION --> <p>TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma);<br> TIFFGetFieldDefaulted(tif, TIFFTAG_REFERENCEBLACKWHITE, &refBlackWhite);<br> if (TIFFYCbCrToRGBInit(ycbcr, luma, refBlackWhite) < 0)</p></td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>exit(0);</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>/* Start conversion */<br> uint32 r, g, b;<br> uint32 Y;<br> int32 Cb, Cr;</p> <!-- INDENTATION --> <p>for each pixel in image</p></td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>TIFFYCbCrtoRGB(img->ycbcr, Y, Cb, Cr, &r, &g, &b);</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>/* Free state structure */<br> _TIFFfree(ycbcr);</p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="8%"></td> <td width="91%"> <p><b>TIFFCIELabToRGBInit()</b> initializes the <i>CIE L*a*b* 1976</i> to <i>RGB</i> conversion state. <b>TIFFCIELabToRGB</b> defined as</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <pre>#define CIELABTORGB_TABLE_RANGE 1500 </pre> </td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="9" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="6%"> <p>typedef struct {</p> </td> <td width="6%"></td> <td width="6%"></td> <td width="6%"></td> <td width="6%"> </td> <td width="6%"> <p>/* CIE Lab 1976->RGB support */</p> </td> <td width="6%"></td> <td width="37%"> </td> <tr valign="top" align="left"> <td width="17%"></td> <td width="6%"> </td> <td width="6%"> <p>int</p> </td> <td width="6%"> <p>range;</p> </td> <td width="6%"></td> <td width="6%"> </td> <td width="6%"> <p>/* Size of conversion table */</p> </td> <td width="6%"></td> <td width="37%"> </td> <tr valign="top" align="left"> <td width="17%"></td> <td width="6%"> </td> <td width="6%"> <p>float</p> </td> <td width="6%"></td> <td width="6%"> <p>rstep, gstep, bstep;</p> </td> <td width="6%"></td> <td width="6%"></td> <td width="6%"></td> <td width="37%"> </td> <tr valign="top" align="left"> <td width="17%"></td> <td width="6%"> </td> <td width="6%"> <p>float</p> </td> <td width="6%"></td> <td width="6%"> <p>X0, Y0, Z0;</p> </td> <td width="6%"></td> <td width="6%"></td> <td width="6%"> <p>/* Reference white point */</p> </td> <td width="37%"> </td> <tr valign="top" align="left"> <td width="17%"></td> <td width="6%"></td> <td width="6%"> <p>TIFFDisplay display;</p> </td> <td width="6%"></td> <td width="6%"></td> <td width="6%"></td> <td width="6%"></td> <td width="6%"></td> <td width="37%"> </td> <tr valign="top" align="left"> <td width="17%"></td> <td width="6%"> </td> <td width="6%"> <p>float</p> </td> <td width="6%"></td> <td width="6%"> <p>Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */</p> </td> <td width="6%"></td> <td width="6%"></td> <td width="6%"></td> <td width="37%"> </td> <tr valign="top" align="left"> <td width="17%"></td> <td width="6%"> </td> <td width="6%"> <p>float</p> </td> <td width="6%"></td> <td width="6%"> <p>Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */</p> </td> <td width="6%"></td> <td width="6%"></td> <td width="6%"></td> <td width="37%"> </td> <tr valign="top" align="left"> <td width="17%"></td> <td width="6%"> </td> <td width="6%"> <p>float</p> </td> <td width="6%"></td> <td width="6%"> <p>Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */</p> </td> <td width="6%"></td> <td width="6%"></td> <td width="6%"></td> <td width="37%"> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>} TIFFCIELabToRGB;</p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="8%"></td> <td width="91%"> <p><i>display</i> is a display device description, declared as</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <pre>typedef struct { </pre> </td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>float d_mat[3][3]; /* XYZ -> luminance matrix */</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>float d_YCR; /* Light o/p for reference white */</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>float d_YCG;</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>float d_YCB;</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>uint32 d_Vrwr; /* Pixel values for ref. white */</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>uint32 d_Vrwg;</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>uint32 d_Vrwb;</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>float d_Y0R; /* Residual light for black pixel */</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>float d_Y0G;</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>float d_Y0B;</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>float d_gammaR; /* Gamma values for the three guns */</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>float d_gammaG;</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>float d_gammaB;</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>} TIFFDisplay;</p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="8%"></td> <td width="91%"> <p>For example, the one can use sRGB device, which has the following parameters:</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <pre>TIFFDisplay display_sRGB = { </pre> </td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="5" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>{ /* XYZ -> luminance matrix */</p> </td> <td width="6%"></td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> </td> <td width="6%"> <p>{ 3.2410F, -1.5374F, -0.4986F },</p> </td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> </td> <td width="6%"> <p>{ -0.9692F, 1.8760F, 0.0416F },</p> </td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> </td> <td width="6%"> <p>{ 0.0556F, -0.2040F, 1.0570F }</p> </td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>},</p> </td> <td width="6%"> </td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>100.0F, 100.0F, 100.0F, /* Light o/p for reference white */</p> </td> <td width="6%"></td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>255, 255, 255, /* Pixel values for ref. white */</p> </td> <td width="6%"></td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>1.0F, 1.0F, 1.0F, /* Residual light o/p for black pixel */</p> </td> <td width="6%"></td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>2.4F, 2.4F, 2.4F, /* Gamma values for the three guns */</p> </td> <td width="6%"></td> <td width="62%"> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>};</p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="8%"></td> <td width="91%"> <p><i>refWhite</i> is a color temperature of the reference white. The <i>TIFFTAG_WHITEPOINT</i> contains the chromaticity of the white point of the image from where the reference white can be calculated using following formulae:</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>refWhite_Y = 100.0<br> refWhite_X = whitePoint_x / whitePoint_y * refWhite_Y<br> refWhite_Z = (1.0 - whitePoint_x - whitePoint_y) / whitePoint_y * refWhite_X</p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="8%"></td> <td width="91%"> <p>The conversion itself performed in two steps: at the first one we will convert <i>CIE L*a*b* 1976</i> to <i>CIE XYZ</i> using <b>TIFFCIELabToXYZ()</b> routine, and at the second step we will convert <i>CIE XYZ</i> to <i>RGB</i> using <b>TIFFXYZToRGB().</b> Look at the code sample below:</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <pre>float *whitePoint; float refWhite[3]; /* Initialize structures */ img->cielab = (TIFFCIELabToRGB *) </pre> </td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>_TIFFmalloc(sizeof(TIFFCIELabToRGB));</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>if (!cielab) {</p></td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="5" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>TIFFError("CIE L*a*b*->RGB",</p> </td> <td width="6%"></td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> </td> <td width="6%"> <p>"No space for CIE L*a*b*->RGB conversion state.");</p> </td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>exit(0);</p> </td> <td width="6%"></td> <td width="62%"> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>}</p> <!-- INDENTATION --> <p>TIFFGetFieldDefaulted(tif, TIFFTAG_WHITEPOINT, &whitePoint);<br> refWhite[1] = 100.0F;<br> refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1];<br> refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1])</p></td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>/ whitePoint[1] * refWhite[1];</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>if (TIFFCIELabToRGBInit(cielab, &display_sRGB, refWhite) < 0) {</p></td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="5" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>TIFFError("CIE L*a*b*->RGB",</p> </td> <td width="6%"></td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> </td> <td width="6%"> <p>"Failed to initialize CIE L*a*b*->RGB conversion state.");</p> </td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>_TIFFfree(cielab);</p> </td> <td width="6%"></td> <td width="62%"> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="0%"></td> <td width="6%"> <p>exit(0);</p> </td> <td width="6%"></td> <td width="62%"> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>}</p> <!-- INDENTATION --> <p>/* Now we can start to convert */<br> uint32 r, g, b;<br> uint32 L;<br> int32 a, b;<br> float X, Y, Z;</p> <!-- INDENTATION --> <p>for each pixel in image</p></td> </table> <!-- TABS --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>TIFFCIELabToXYZ(cielab, L, a, b, &X, &Y, &Z);</p> </td> <tr valign="top" align="left"> <td width="24%"></td> <td width="75%"> <p>TIFFXYZToRGB(cielab, X, Y, Z, &r, &g, &b);</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="17%"></td> <td width="82%"> <p>/* Don’t forget to free the state structure */<br> _TIFFfree(cielab);</p></td> </table> <a name="SEE ALSO"></a> <h2>SEE ALSO</h2> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="8%"></td> <td width="91%"> <p><b>TIFFRGBAImage</b>(3TIFF) <b>libtiff</b>(3TIFF),</p> <!-- INDENTATION --> <p>Libtiff library home page: <b>http://www.remotesensing.org/libtiff/</b></p> </td> </table> <hr> </body> </html>
Close