TIFFREADRGBASTRIP(3tiff) LibTIFF TIFFREADRGBASTRIP(3tiff) NNAAMMEE TIFFReadRGBAStrip - read and decode an image strip into a fixed-format raster SSYYNNOOPPSSIISS #include iinntt TTIIFFFFRReeaaddRRGGBBAASSttrriipp((TTIIFFFF **ttiiff,, uuiinntt3322__tt rrooww,, uuiinntt3322__tt **rraasstteerr)) iinntt TTIIFFFFRReeaaddRRGGBBAASSttrriippEExxtt((TTIIFFFF **ttiiff,, uuiinntt3322__tt rrooww,, uuiinntt3322__tt **rraasstteerr,, iinntt ssttoopp__oonn__eerrrroorr)) DDEESSCCRRIIPPTTIIOONN _T_I_F_F_R_e_a_d_R_G_B_A_S_t_r_i_p_(_) reads a single strip of a strip-based image into memory, storing the result in the user supplied RGBA _r_a_s_t_e_r. The raster is assumed to be an array of IImmaaggeeWWiiddtthh RRoowwssPPeerrSSttrriipp 32-bit entries, where IImmaaggeeWWiiddtthh is the width of the image (TTIIFFFF-- TTAAGG__IIMMAAGGEEWWIIDDTTHH) and RRoowwssPPeerrSSttrriipp is the maximum lines in a strip (TTIIFFFF-- TTAAGG__RROOWWSSPPEERRSSTTRRIIPP). _T_I_F_F_R_e_a_d_R_G_B_A_S_t_r_i_p_E_x_t_(_) provides the paramater _s_t_o_p___o_n___e_r_r_o_r. Its be- haviour is described at _T_I_F_F_R_e_a_d_R_G_B_A_I_m_a_g_e. The _r_o_w value should be the row of the first row in the strip (_s_t_r_i_p RRoowwssPPeerrSSttrriipp, zero based). 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 strip. That is bottom to top organi- zation. When reading a partial last strip in the file the last line of the image will begin at the beginning of the buffer. 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_S_t_r_i_p_(_) 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 strip. The _T_I_F_F_R_e_a_d_R_G_B_A_T_i_l_e_(_) function does a similar operation for tiled 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\\ffPP: 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_T_i_l_e (3tiff), _l_i_b_t_i_f_f (3tiff) AAUUTTHHOORR LibTIFF contributors CCOOPPYYRRIIGGHHTT 1988-2022, LibTIFF contributors 4.6 Sep 08, 2023 TIFFREADRGBASTRIP(3tiff)