I'm using Magick.NET-Q8-AnyCPU.dll to convert PDF to PNG(s), however I am unable to make the PNG interlaced.
Here's my code.
Code: Select all
MagickReadSettings settings = new MagickReadSettings();
settings.Density = new PointD(300, 300);
using (MagickImageCollection miImages = new MagickImageCollection())
{
miImages.Read(Path.Combine(filePath, "file.pdf"), settings);
int page = 1;
foreach (MagickImage miImage in miImages)
{
miImage.Scale(image.width + 1, image.width * miImage.Height / miImage.Width);
miImage.ColorAlpha(miImage.BackgroundColor);
miImage.Interlace = Interlace.Png;
miImage.Write(filePath + image.size + "-" + page + ".png");
page++;
}
}
Thanks in advance
Michael