.tiff image file this error is coming how can I solve?

2 ビュー (過去 30 日間)
RS
RS 2013 年 8 月 14 日
%Set file names and obtain size information from input file.
inFile = 'example.tif';
inFileInfo = imfinfo(inFile);
outFile = 'out.tif';
%Create an output TIFF file with tile size of 128x128
tileSize = [128, 128]; % has to be a multiple of 16.
outFileWriter = bigTiffWriter(outFile, inFileInfo(1).Height, inFileInfo(2).Width, tileSize(1), tileSize(2));
Index exceeds matrix dimensions.
when I am working with .tiff image file this error is coming for that which parameter to be change, how can I solve?

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 8 月 14 日
Why are you expecting inFileInfo to have two structure arrays, considering that you are asking for information about only one file? inFileInfo(2).Width would be to get the Width information from the second structure array element. Try inFileInfo(1).Width

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by