Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Is there a way to read photo after CRC error?

$
0
0
In the new version of Magick.NET that has just been published you will be able to do read the image even though it is corrupt. You can do that with the new class PngReadDefines. Below is an example:
MagickReadSettings settings = new MagickReadSettings()
{
    Defines = new PngReadDefines()
    {
        PreserveCorruptImage = true
    }
};

using (MagickImage image = new MagickImage())
{
    try
    {
        image.Read("Corrupt.png", settings);
    }
    catch (MagickCoderErrorException)
    {
        // Do something with the image.
    }
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>