All,
Env: .net 2.0, x64 build of Magick.NET library
I have the following code where I read the .tif file and want to convert it to .pdf.
using (MagickImage image = new MagickImage())
{
image.SetDefine(MagickFormat.Tiff, "ignore-tags", "32934");
image.Read(sourceFilePath);;
image.Write(targetFilePath);
}
image.Read() throws MagickCoderErrorException, and the inner exception is MagickCoderWarningException complaining about:
ImageMagick.vshost.exe: Unknown field with tag 32934 (0x80a6) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/880
You can clearly see in my code that I instructed the library to ignore this tag and still I get this exception. Why? Btw, when I catch the exception, and do nothing and call image.Write(my.pdf) I get a pdf generated but I don't want to be simply ignoring exceptions if I am doing something wrong.
All,
This issue was fixed by having the author add support for ignoring tags in the Magic.net library, check release Magick.NET 7.0.0.0018.