Main Content

currentDirectory

Return index of current IFD

Description

example

dirNum = currentDirectory(t) returns the index of the current image file directory (IFD). Index values are one-based.

Examples

collapse all

Create a Tiff object for a TIFF file and determine which IFD is the current IFD.

t = Tiff('example.tif','r');
dnum = currentDirectory(t)
dnum = 1

Close the Tiff object.

close(t);

Input Arguments

collapse all

Tiff object representing a TIFF file. Use the Tiff function to create the object.

Algorithms

collapse all

References

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

Introduced in R2009b