I'm using the following code to create a PDF from a PNG with Magick.NET-Q16-AnyCPU version 7.0.1.101 installed via NuGet.
Thank you for you time, and thank you for Magick.NET, it's a real time saver.
using (MagickImage image = new MagickImage(@"C:\test.png"))
{
image.Format = MagickFormat.Pdf;
image.Write(@"C:\test.pdf");
}
I've noticed that if the PNG is large, for example, 1080*40000 then a System.AccessViolationException is thrown. If the PNG is more modest in size, for example, 1080x1920, then the conversion works fine. If I try to catch the System.AccessViolationException, my application still crashes regardless, so I can't program defensively against this exception.Thank you for you time, and thank you for Magick.NET, it's a real time saver.