TIFFREADRGBATILE(3tiff) LibTIFF TIFFREADRGBATILE(3tiff) NNAAMMEE TIFFReadRGBATile - read and decode an image tile into a fixed-format raster SSYYNNOOPPSSIISS #include iinntt TTIIFFFFRReeaaddRRGGBBAATTiillee((TTIIFFFF **ttiiff,, uuiinntt3322__tt xx,, uuiinntt3322__tt yy,, uuiinntt3322__tt **rraasstteerr)) iinntt TTIIFFFFRReeaaddRRGGBBAATTiilleeEExxtt((TTIIFFFF **ttiiff,, uuiinntt3322__tt ccooll,, uuiinntt3322__tt rrooww,, uuiinntt3322__tt **rraasstteerr,, iinntt ssttoopp__oonn__eerrrroorr)) DDEESSCCRRIIPPTTIIOONN _T_I_F_F_R_e_a_d_R_G_B_A_T_i_l_e_(_) reads a single tile of a tile-based image into mem- ory, storing the result in the user supplied RGBA _r_a_s_t_e_r. The raster is assumed to be an array of TTiilleeWWiiddtthh TTiilleeLLeennggtthh 32-bit entries, where TTiilleeWWiiddtthh is the width of a tile (TTIIFFFFTTAAGG__TTIILLEEWWIIDDTTHH) and TTiillee-- LLeennggtthh is the height of a tile (TTIIFFFFTTAAGG__TTIILLEELLEENNGGTTHH). _T_I_F_F_R_e_a_d_R_G_B_A_T_i_l_e_E_x_t_(_) provides the parameter _s_t_o_p___o_n___e_r_r_o_r. Its behav- iour is described at _T_I_F_F_R_e_a_d_R_G_B_A_I_m_a_g_e. The _x and _y values are the offsets from the top left corner to the top left corner of the tile to be read. They must be an exact multiple of the tile width and length. Note that the raster is assume to be organized such that the pixel at location (_x, _y) is _r_a_s_t_e_r [ _y _w_i_d_t_h + _x ]; with the raster origin in the _l_o_w_e_r_-_l_e_f_t _h_a_n_d _c_o_r_n_e_r of the tile. That is bottom to top organiza- tion. Edge tiles which partly fall off the image will be filled out with appropriate zeroed areas. Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros _T_I_F_F_G_e_t_R, _T_I_F_F_G_e_t_G, _T_I_F_F_G_e_t_B, and _T_I_F_F_G_e_t_A should be used to access individual samples. Images without Associated Alpha matting information have a constant Alpha of 1.0 (255). See the _T_I_F_F_R_G_B_A_I_m_a_g_e page for more details on how various image types are converted to RGBA values. NNOOTTEESS Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric sam- ples/pixel must be either 1, 3, or 4 (i.e. SSaammpplleessPPeerrPPiixxeell - EExxttrraaSSaamm-- pplleess). Palette image colormaps that appear to be incorrectly written as 8-bit values are automatically scaled to 16-bits. _T_I_F_F_R_e_a_d_R_G_B_A_T_i_l_e_(_) is just a wrapper around the more general _T_I_F_F_R_G_B_A_I_m_a_g_e facilities. Its main advantage over the similar _T_I_F_F_R_e_a_d_R_G_B_A_I_m_a_g_e_(_) function is that for large images a single buffer capable of holding the whole image doesnt need to be allocated, only enough for one tile. The _T_I_F_F_R_e_a_d_R_G_B_A_S_t_r_i_p_(_) function does a similar operation for stripped images. RREETTUURRNN VVAALLUUEESS 1 is returned if the image was successfully read and converted. Other- wise, 0 is returned if an error was encountered. DDIIAAGGNNOOSSTTIICCSS All error messages are directed to the _T_I_F_F_E_r_r_o_r_E_x_t_R_(_) routine. ""SSoorrrryy,, ccaann nnoott hhaannddllee %%dd--bbiitt ppiiccttuurreess"": The image had BBiittssPPeerrSSaammppllee other than 1, 2, 4, 8, or 16. ""SSoorrrryy,, ccaann nnoott hhaannddllee %%dd--cchhaannnneell iimmaaggeess"": The image had SSaammpplleessPPeerrPPiixxeell other than 1, 3, or 4. MMiissssiinngg nneeeeddeedd ""PPhhoottoommeettrriiccIInntteerrpprreettaattiioonn"" ttaagg: The image did not have a tag that describes how to display the data. NNoo ""PPhhoottoommeettrriiccIInntteerrpprreettaattiioonn"" ttaagg,, aassssuummiinngg RRGGBB: The image was missing a tag that describes how to display it, but because it has 3 or 4 samples/pixel, it is assumed to be RGB. NNoo ""PPhhoottoommeettrriiccIInntteerrpprreettaattiioonn"" ttaagg,, aassssuummiinngg mmiinn--iiss--bbllaacckk: The image was missing a tag that describes how to display it, but because it has 1 sample/pixel, it is assumed to be a grayscale or bilevel image. ""NNoo ssppaaccee ffoorr pphhoottoommeettrriicc ccoonnvveerrssiioonn ttaabbllee"": There was insufficient memory for a table used to convert image sam- ples to 8-bit RGB. MMiissssiinngg rreeqquuiirreedd ""CCoolloorrmmaapp"" ttaagg: A Palette image did not have a required CCoolloorrmmaapp tag. ""NNoo ssppaaccee ffoorr ttiillee bbuuffffeerr"": There was insufficient memory to allocate an i/o buffer. ""NNoo ssppaaccee ffoorr ssttrriipp bbuuffffeerr"": There was insufficient memory to allocate an i/o buffer. ""CCaann nnoott hhaannddllee ffoorrmmaatt"": The image has a format (combination of BBiittssPPeerrSSaammppllee, SSaammpplleessPPeerr-- PPiixxeell, and PPhhoottoommeettrriiccIInntteerrpprreettaattiioonn) that _T_I_F_F_R_e_a_d_R_G_B_A_I_m_a_g_e_(_) can not handle. ""NNoo ssppaaccee ffoorr BB&&WW mmaappppiinngg ttaabbllee"": There was insufficient memory to allocate a table used to map grayscale data to RGB. ""NNoo ssppaaccee ffoorr PPaalleettttee mmaappppiinngg ttaabbllee"": There was insufficient memory to allocate a table used to map data to 8-bit RGB. SSEEEE AALLSSOO _T_I_F_F_O_p_e_n (3tiff), _T_I_F_F_R_G_B_A_I_m_a_g_e (3tiff), _T_I_F_F_R_e_a_d_R_G_B_A_I_m_a_g_e (3tiff), _T_I_F_F_R_e_a_d_R_G_B_A_S_t_r_i_p (3tiff), _l_i_b_t_i_f_f (3tiff) AAUUTTHHOORR LibTIFF contributors CCOOPPYYRRIIGGHHTT 1988-2022, LibTIFF contributors 4.6 Sep 08, 2023 TIFFREADRGBATILE(3tiff)