Skip to Main Content Skip to Search
Product Documentation

writeDirectory - Class: Tiff

Create new IFD and make it current IFD

Syntax

tiffobj.writeDirectory()

Description

tiffobj.writeDirectory() create a new image file directory (IFD) and makes it the current IFD. Tiff object methods operate on the current IFD. If you are creating a TIFF file that only contains one image, you do not need to use this method. With single-image TIFF files, just close the Tiff object to write data to the file.

Examples

Open a TIFF file for modification and create a new IFD in the file. writeDirectory makes the newly created IFD the current IFD. Replace the name myfile.tif with the name of a TIFF file on your MATLAB path.

t = Tiff('myfile.tif', 'r+');
dnum = t.currentDirectory();
t.writeDirectory();
dnum = t.currentDirectory();

References

This method corresponds to the TIFFWriteDirectory 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

Tiff.close | Tiff.write

Tutorials

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS