ImageMagick.MagickCoderErrorException : 'IDAT: CRC error `' @ error/png.c/MagickPNGErrorHandler/1715'
See original GitHub issuePrerequisites / Description
Hi !
Everytime I run the following code on the specified PNG image I get “ImageMagick.MagickCoderErrorException : ‘IDAT: CRC error `’ @ error/png.c/MagickPNGErrorHandler/1715’”.
I searched for this issue in this repository, on GitHub, on StackOverflow and everywhere on Google but I can’t find anything useful regarding “ImageMagick.MagickCoderErrorException”, “IDAT: CRC error” nor “error/png.c/MagickPNGErrorHandler/1715”, so I post it here.
Steps to Reproduce
using ImageMagick;
using System.Net;
namespace MagickCRCError
{
internal class Program
{
private static void Main(string[] args)
{
byte[] data;
using (WebClient client = new WebClient())
{
data = client.DownloadData("https://www.muenzeoesterreich.at/var/em_plain_site/storage/images/_aliases/product_full/media/bilder/produktbilder/2.sammeln/2.2.5_euro/5e_2018_osterhase_set/3970854-2-ger-DE/5e_2018_osterhase_set.png");
}
MagickImage image = new MagickImage(data);
image.BackgroundColor = MagickColors.White;
}
}
}
System Configuration
- Magick.Net version : 7.15.0
- .Net version : Core 3.0
- OS version : Windows 10 1909 x64 (18363.592)
It’s probably an issue from the PNG itself (CRC Error) but I can open it in any web browser or image viewer so it’s a bit weird to me. Feel free to close this issue if I have missed something.
Anyway, thanks for developing Magick.Net !
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Hang file and error INFECTED PNG files - Magick
I have some INFECTED PNG samples which image magick failed to convert. ... Code: Select all convert.exe: IDAT: CRC error `O:\infile.png' ...
Read more >Exception creating and saving an image multiple times with ...
Update: It seems the actual problem is I have a preview pane that contains a background image of the image that gets saved....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The ImageMagick library that is being used by Magick.NET is very strict about the PNG file being valid. And it appears that your file is not valid. There is an option to disable CRC checking and I should add that to the
PngReadDefines
but I tried that on the command line and it then still fails to read the file. Other programs can read the image because they are less strict about the contents of the file and probably ignore a lot of information that is still being read by ImageMagick.Could you create a new issue @Wabbbit and explain in more detail (with a test image) the issue that you are experiencing?