rewriteDirectory

Class: Tiff

Write modified metadata to existing IFD

Syntax

rewriteDirectory(tiffobj)

Description

rewriteDirectory(tiffobj) writes modified metadata (tag) data to an existing directory. Use this tag when you want to change the value of a tag in an existing image file directory.

Examples

Modify Value of Tag

Write a sample TIFF file, mytif.tif. Create a TIFF object associated with this file.

imdata = peaks(256);
imwrite(imdata,'mytif.tif');
t = Tiff('mytif.tif','r+');

Modify the value of a tag.

setTag(t,'Software','MATLAB')
rewriteDirectory(t)
close(t);

References

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

Was this topic helpful?