%% Modify Value of Tag
% Create image data, write it to a TIFF file, and modify the value of a tag.
% Write a sample TIFF file, mytif.tif and 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);

% Copyright 2012 The MathWorks, Inc.