Documentation Center

  • Trial Software
  • Product Updates

setDirectory

Class: Tiff

Make specified IFD current IFD

Syntax

tiffobj.setDirectory(dirNum)

Description

tiffobj.setDirectory(dirNum) sets the image file directory (IFD) specified by dirNum as the current IFD. Tiff object methods operate on the current IFD. The directory index number is one-based.

Examples

Open a TIFF file and move to an IFD in the file by specifying its index number. The TIFF file should contain multiple images.

t = Tiff('example.tif','r');
t.setDirectory(2);
t.close();

References

This method corresponds to the TIFFSetDirectory function in the LibTIFF C API. To use this method, you must be familiar with the TIFF specification and technical notes. View this documentation at LibTIFF - TIFF Library and Utilities.

See Also

|

Tutorials

Was this topic helpful?