%% Write Multiple Images to TIFF File
% Write multiple images to a single multipage TIFF file.
% Create two sets of random image data, im1 and im2.

im1 = rand(50,40,3);
im2 = rand(50,50,3);

%
% Write the first image to a new TIFF file. Then, append the second image to the same file.

imwrite(im1,'myMultipageFile.tif')
imwrite(im2,'myMultipageFile.tif','WriteMode','append')

% Copyright 2015 The MathWorks, Inc.