TIFFSETDIRECTORY(3tiff) LibTIFF TIFFSETDIRECTORY(3tiff) NNAAMMEE TIFFSetDirectory - set the current directory for an open TIFF file SSYYNNOOPPSSIISS #include iinntt TTIIFFFFSSeettDDiirreeccttoorryy((TTIIFFFF **ttiiff,, ttddiirr__tt ddiirrnnuumm)) iinntt TTIIFFFFSSeettSSuubbDDiirreeccttoorryy((TTIIFFFF **ttiiff,, uuiinntt6644__tt ddiirrooffff)) DDEESSCCRRIIPPTTIIOONN _T_I_F_F_S_e_t_D_i_r_e_c_t_o_r_y_(_) changes the current directory and reads its contents with _T_I_F_F_R_e_a_d_D_i_r_e_c_t_o_r_y_(_). The parameter _d_i_r_n_u_m specifies the sub- file/directory as an integer number, with the first directory numbered zero. _T_I_F_F_S_e_t_D_i_r_e_c_t_o_r_y_(_) only works with main-IFD chains because all- ways starts with the first main-IFD and thus is able to reset the SubIFD reading chain to the main-IFD chain. _T_I_F_F_S_e_t_S_u_b_D_i_r_e_c_t_o_r_y_(_) acts like _T_I_F_F_S_e_t_D_i_r_e_c_t_o_r_y_(_), except the direc- tory is specified as a file offset instead of an index; this is required for accessing subdirectories linked through a SSuubbIIFFDD tag. (see _M_u_l_t_i_P_a_g_e _S_u_b_I_F_D) Directory query functions _T_I_F_F_C_u_r_r_e_n_t_D_i_r_e_c_t_o_r_y_(_), _T_I_F_F_C_u_r_r_e_n_t_D_i_r_O_f_f_s_e_t_(_), _T_I_F_F_L_a_s_t_D_i_r_e_c_t_o_r_y_(_) and _T_I_F_F_N_u_m_b_e_r_O_f_D_i_r_e_c_t_o_r_i_e_s_(_) retrieve information about directories in an open TIFF file. Be aware that until a directory is not written to file AND read back, the query functions wont retrieve the correct informa- tion! RREETTUURRNN VVAALLUUEESS On successful return 1 is returned. Otherwise, 0 is returned if _d_i_r_n_u_m or _d_i_r_o_f_f specifies a non-existent directory, or if an error was encountered while reading the directorys contents. DDIIAAGGNNOOSSTTIICCSS All error messages are directed to the _T_I_F_F_E_r_r_o_r_E_x_t_R_(_) routine. ""%%ss:: EErrrroorr ffeettcchhiinngg ddiirreeccttoorryy ccoouunntt"": An error was encountered while reading the directory count field. ""%%ss:: EErrrroorr ffeettcchhiinngg ddiirreeccttoorryy lliinnkk"": An error was encountered while reading the link value that points to the next directory in a file. SSEEEE AALLSSOO _T_I_F_F_q_u_e_r_y (3tiff), _T_I_F_F_O_p_e_n (3tiff), _T_I_F_F_C_r_e_a_t_e_D_i_r_e_c_t_o_r_y (3tiff), _T_I_F_F_C_u_s_t_o_m_D_i_r_e_c_t_o_r_y (3tiff), _T_I_F_F_W_r_i_t_e_D_i_r_e_c_t_o_r_y (3tiff), _T_I_F_F_R_e_a_d_D_i_r_e_c_t_o_r_y (3tiff), _M_u_l_t_i _P_a_g_e _/ _M_u_l_t_i _I_m_a_g_e _T_I_F_F, _l_i_b_t_i_f_f (3tiff) AAUUTTHHOORR LibTIFF contributors CCOOPPYYRRIIGGHHTT 1988-2022, LibTIFF contributors 4.6 Sep 08, 2023 TIFFSETDIRECTORY(3tiff)