www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/WriteMultipleImagestoTIFFFileExample.m

    %% Write Multiple Images to TIFF File  
% Write multiple images to a single multipage TIFF file.   

% Copyright 2015 The MathWorks, Inc.


%% 
% 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')