Too many IDAT's found.The image data may be corrupt.MA​TLAB:image​sci:png:to​oManyIDATs​Data'

2 Ansichten (letzte 30 Tage)
I have written a code to clean my image data and move the files causing error into other file.
imageDir = 'C:\Users.......\paved';
imgList = dir(imageDir);
destFolder = 'C:\Users.....\Dpaved';
for i = 3: numel(imgList)
img = fullfile(imgList(1).folder,imgList(i).name);
lastwarn = [lastmsg, lastid] ;
try
I = imread(img);
catch MException
movefile(img,destFolder); %[status,message,messageId] = movefile(img,destFolder,'f');
end
end
-----------------------------------------------------------------------------------------------------------------------------------
Following errors arrive
Warning: PNG library warning: Ignoring bad adaptive filter type.
> In readpngutil (line 12)
In readpng (line 32)
In imread/call_format_specific_reader (line 447)
In imread (line 440)
In imageCleanup (line 11)
Warning: PNG library warning: Extra compressed data..
> In readpngutil (line 12)
In readpng (line 32)
In imread/call_format_specific_reader (line 447)
In imread (line 440)
Warning: Too many IDAT's found. The image data may be corrupt.
> In readpngutil (line 13)
In readpng (line 32)
In imread/call_format_specific_reader (line 447)
In imread (line 440)
In imageCleanup (line 11)

Antworten (0)

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by