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

New Post: Image corruption issue

$
0
0
I am using Magick.NET to convert TIFF images from a check scanner into to a banking industry standard.

There is an image validator tool that is reporting some errors when certain images are processed using Magick.NET-Q16-AnyCPU net40-client 6.8.9.601.

The specific error messages from the validator:
  1. FillOrder: Tiff value is a defined variance
  2. End of Facsimile Block: Tiff image segment does not end with EOFB
In fact, simply loading the image and rewriting it without any manipulation will cause these compliance issues.
   static void Main(string[] args)
    {
        Console.WriteLine(MagickNET.Version);

        var bytes = File.ReadAllBytes(@"C:\images\WinIDAImages\2016-01-05T10-52-26-715_22_front.tiff");
        using (var magickImage = new MagickImage(bytes))
        {
            Console.WriteLine("Before ToByteArray");

            // raw
            var magickImageBytes = magickImage.ToByteArray();
            File.WriteAllBytes(@"C:\images\WinIDAImages\magick.NET_raw.tiff", magickImageBytes);

            Console.WriteLine();
        }
        Console.WriteLine("Press any key");
        Console.ReadKey();
    }
Using ImageMagick 6.9.3 as follows the validator does not report the compliance issues:
convert 2016-01-05T10-52-26-715_22_front.tiff IM6_raw.tiff
Using ImageMagick 6.9.3 as follows the validator does not report any compliance issues:
convert 2016-01-05T10-52-26-715_22_front.tiff -monochrome -colorspace Gray -compress Group4 -set units PixelsPerInch -density 240 IM6Converted.tif
So my questions:
  1. Is this a Magick.NET issue? I am not certain if Magick.NET wraps ImageMagick 6.9.3 or a different version of ImageMagick that exhibits this issue
  2. Depending on above - is there a version of Magick.NET that wraps ImageMagick 6.9.3? (that may mitigate this issue)
  3. Any recommendations for workaround? We prefer not to use Magick.NET 7.0.0.0022 because it is beta and we experienced some different issues with that version of the tool. We also had some issues with 7.0.0.0008
I can provide the TIFF files if that will help

Thank you in advance

Art

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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