Magick: WriteBlob Failed

Jul 4, 2014 at 1:50 PM
I am converting a large number of PDFs to PNGs with a WPF application using the Magick.NET library. I got the following error during the process:

Magick: WriteBlob Failed 'Filename' @ error/png.c/MagickPNGErrorHandler/1806

Since my application is multi-threaded, it sorts of kills the thread in which the error occured. The threads run a while loop to convert documents until the document collection is not empty so I assume it exits out of the loop on the exception even though its surrounded in try-catch block.

Any ideas on why this could be happening?

Jul 4, 2014 at 2:06 PM
Just realised that all the PDFs that I got an error on have a space before the extension like "TestDocument .pdf".

That means when I create a directory of the name of the file, Windows trims any trailing spaces on the directory name but I still try to write to the directory name with a space in the end which does not actually exist and gives me this error. Apparently, it has nothing to do with Magick.NET and is a problem with my code.