Too many IDAT's found.The image data may be corrupt.MATLAB:imagesci:png:tooManyIDATsData'
4 views (last 30 days)
Show older comments
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)
Answers (0)
See Also
Categories
Find more on Read, Write, and Modify Image 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!