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

New Post: MagickCoderErrorException but I have ignored the warning tag

$
0
0
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.

Viewing all articles
Browse latest Browse all 3693

Trending Articles