Problem with Interlace PNG
Posted: 2016-03-07T14:10:08-07:00
Hi,
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.
I have also tried several settings ("miImage.Interlace = Interlace.Line;" etc ) but the image size never changes, and when I check the metadata with this online tool http://regex.info/exif.cgi it says it is "Noninterlaced"
Thanks in advance
Michael
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