Thank you.
I have repeated my conversion experiments using Magick.NET 7.0.0.0022.
While the testing is not yet exhaustive, using Magick.NET 7.0.0.0022 to convert TIFF images from a check scanner into to the banking industry standard format appears to produce compliant TIFF files.
This is an improvement over both 6.8.9.601 and 7.0.0.008
(with 7.0.0.008 we had some TIFF images that were all black when converted)
The issue I mentioned earlier is when using Magick.NET 7.0.0.0022 to convert JPG to the required TIFF format. Of 3 test files, 2 of the converted images appear to be all white.
I have isolated this to assigning the Group4 compression method:
Q: Any suggestions for how to work around this issue?
I can provide the image files if that will help
Thank you in advance
Art
I have repeated my conversion experiments using Magick.NET 7.0.0.0022.
While the testing is not yet exhaustive, using Magick.NET 7.0.0.0022 to convert TIFF images from a check scanner into to the banking industry standard format appears to produce compliant TIFF files.
This is an improvement over both 6.8.9.601 and 7.0.0.008
(with 7.0.0.008 we had some TIFF images that were all black when converted)
The issue I mentioned earlier is when using Magick.NET 7.0.0.0022 to convert JPG to the required TIFF format. Of 3 test files, 2 of the converted images appear to be all white.
I have isolated this to assigning the Group4 compression method:
static void Main(string[] args)
{
Console.WriteLine(MagickNET.Version);
const string srcFile = @"C:\dev\Sandbox\JpegToTiff\JpegToTiff\image_front.jpg";
// const string srcFile = @"C:\dev\Sandbox\JpegToTiff\JpegToTiff\image_front3.jpg
const string destFile = @"C:\images\WinIDAImages\magick.NET_raw.jpg";
var bytes = File.ReadAllBytes(srcFile);
var magickReadSettings = new MagickReadSettings
{
UseMonochrome = true
};
using (var magickImage = new MagickImage(bytes, magickReadSettings))
{
Console.WriteLine("Before ToByteArray");
magickImage.ResolutionUnits = Resolution.PixelsPerInch;
magickImage.ColorSpace = ColorSpace.Gray;
magickImage.Density = new PointD(200, 200);
magickImage.Format = MagickFormat.Tif;
//group4 compression
magickImage.CompressionMethod = CompressionMethod.Group4;
File.WriteAllBytes(destFile, magickImage.ToByteArray());
Console.WriteLine();
}
Console.WriteLine("Press any key");
Console.ReadKey();
}
In this sample, if the CompressionMethod = CompressionMethod.Group4 line is removed then the converted image is not all white. However it is not compliant with the industry required format.Q: Any suggestions for how to work around this issue?
I can provide the image files if that will help
Thank you in advance
Art