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

New Post: 'System.AccessViolationException' when creating large PDF from a PNG

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

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>