I am new to Magick.net. I found it last week.
What I am trying to do is reading a image of a pdf file.
Here is my code:
coverPage.Read(fn+"[0]", settings);
Any idea?
Thank you
What I am trying to do is reading a image of a pdf file.
Here is my code:
public static System.Drawing.Bitmap GetPreview(string fn)
{
System.Drawing.Bitmap bmp;
MagickReadSettings settings = new MagickReadSettings();
settings.Density = new MagickGeometry(100, 100);
settings.ColorSpace = ColorSpace.sRGB;
settings.Format = MagickFormat.Jpeg;
using (MagickImage coverPage = new MagickImage())
{
coverPage.Format = MagickFormat.Jpeg;
coverPage.Quality = 50;
coverPage.Read(fn+"[0]", settings);
using (MemoryStream m = new MemoryStream())
{
bmp = coverPage.ToBitmap(System.Drawing.Imaging.ImageFormat.Jpeg);
}
}
return bmp;
}
This code is ok for Magick.NET-x64.dll. But somehow if I set my platform to x86 and using Magick.NET-x86.dll, I got System.StackOverflowException when it executescoverPage.Read(fn+"[0]", settings);
Any idea?
Thank you