Does MATLAB support writing multipage TIFF files?

조회 수: 14 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2010년 7월 1일
A standard format for a multipage TIFF is a 3-D array (length x width x
  1. of frames) and this is the format stored by many other imaging
programs. So if I read this data into MATLAB and process it, I would
like to re-write the data so that multiple images are stored separately in one TIFF file.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2010년 7월 1일
IMWRITE supports multipage TIFF files as the following example illustrates:
a = imread('peppers.png');
imwrite(a, 'myFile.TIFF')
imwrite(rgb2gray(a), 'myFile.TIFF', 'writemode', 'append')
Hence, IMWRITE will write the images on a single page one above the other. We use "append" parameter to do this. When using IMREAD to read the same image, you could use indexing as described in the documentation, to read the various images aligned by IMWRITE.
For example, the following commands would read and display both the frames from myFile.TIFF.
imshow(imread('myFile.TIFF',1))
imshow(imread('myFile.TIFF',2))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by