Create new IFD and make it current IFD
writeDirectory(t)
example
writeDirectory(t) creates a new image file directory (IFD) and makes it the current IFD.
t
collapse all
Create a new TIFF file and add two new IFDs to the file.
Create a Tiff object for a new file.
Tiff
t = Tiff('myfile.tif','w');
Add a new IFD to the file and display the current directory number. You can use this new IFD to add image data and tags to the TIFF file.
writeDirectory(t); currentDirectory(t)
ans = 1
Add another IFD to the file and display the current directory number. You can use this IFD to save an additional image to the same TIFF file.
ans = 2
Close the Tiff object.
close(t);
Tiff object representing a TIFF file. Use the Tiff function to create the object.
You do not need this function when creating TIFF files that contain only one image.
This function corresponds to the TIFFWriteDirectory 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.
TIFFWriteDirectory
LibTIFF - TIFF Library and Utilities
close | write
close
write
You have a modified version of this example. Do you want to open this example with your edits?