This project has moved. For the latest updates, please go here.

'System.AccessViolationException' when creating large PDF from a PNG

May 16, 2016 at 6:26 PM
I'm using the following code to create a PDF from a PNG with Magick.NET-Q16-AnyCPU version installed via NuGet.
using (MagickImage image = new MagickImage(@"C:\test.png"))
          image.Format = MagickFormat.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.
May 16, 2016 at 7:49 PM
Can you share a file that I can use to reproduce the issue? Is your code executed in a 32-bit or a 64-bit environment?