imfinfo doesnt work in R2022b, it's bugged

조회 수: 32(최근 30일)
IOANNIS 2022년 11월 22일
댓글: IOANNIS 2022년 11월 24일
Hello! I am using imfinfo to matlab version R2022b and i get this error:
Failed to create file modification time character vector.
The same function works perfectly in version R2019a.
How can i fix it in version R2022b?
My command is:
x = imfinfo('my_file.tif');
Thanks in Advance
  댓글 수: 5
Jan 2022년 11월 22일
As said already: Please send this as bug report to MathWorks.

댓글을 달려면 로그인하십시오.

채택된 답변

Steven Lord
Steven Lord 2022년 11월 22일
Since you said imfinfo works for other files but not this one, I'm wondering if the file has somehow been corrupted or if it was written in a non-standard way that imfinfo was lenient enough to allow in the past but is strict enough now (through bug fixes or updates) that it no longer accepts the non-standard file.
First let's check to see if this problem is specific to the .tif file processing code. MATLAB includes one .tif file as part of one of the demos, example.tif. Let's see if imfinfo works on that file. What do you see when you run these lines of code?
name = fullfile(matlabroot, 'toolbox', 'matlab', 'demos', 'example.tif');
S = imfinfo(name);
ans = '08-Nov-2009 01:02:06'
If that works, then let's see if some other software recognizes this file. What operating system are you using? If you're using Windows, right-click on your my_file.tif in File Explorer and select Properties. In the Properties window for your file, select the Details tab and scroll down to the end of the list, the section with the heading File. What do you see for the "Date created" and "Date modified" entries?
If you see the correct or reasonable data in the Windows properties for the file, let's try one more step. Call imfinfo on your file and let it error. Then run this command and show us what it displays. This will let us see the stack of the error and check whether you've overloaded (or downloaded an overload for) a function upon which imfinfo depends that's preventing it from operating correctly.
ex = MException.last;
result = struct2table(ex.stack)
  댓글 수: 10
IOANNIS 2022년 11월 24일
Thank you @DGM !!! geotiffinfo() works perfect in R2022b for these files. I had completely forgotten about this function. Thank you!

댓글을 달려면 로그인하십시오.

추가 답변(0개)


Find more on Startup and Shutdown in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by