Error using imread (line 440), PNG library failed: tEXt: chunk data is too large.
2 次查看(过去 30 天)
显示 更早的评论
so far the code that i am using to read PNG files (max 50MB each) is running on 2011b matlab version and no issue, recently started running it on 2021a Matlab version,the above error is appearing.
imread Line 440 : [X, map] = call_format_specific_reader(); nothing much info to get from this line i guess
any leads on how to resovle this issue ir anyone come acrros the same issue
1 个评论
Jayant Gangwar
2022-11-23
Hi Sivasankararao,
There is not much information that I can get from just the error message itself.
Can you attach the code file and Image files as well, so I can find out why the above error is appearing.
回答(1 个)
Rahul
2025-5-5
It appears as the PNG files you worked with in MATLAB R2011b contain metadata chunks such as tEXt which contain textual information. However, it appears that the updated library for reading images in MATLAB R2021a imposes stricter contraints on tEXt chunk.
There is no direct way to do this in MATLAb. Hence removing tEXt metadata from the images can be done using third party tools like: 'ImageMagick' and 'ExifTool'.
After removing the tEXt metadata, the images can be read through the 'imread' function.
Thanks.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Standard File Formats 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!