Using the follow code to convert a PDF in the form of a byte array to a PNG image.
It's converting it successfully and the PNG image is the correct size, 4 inches by 6 inches. The problem is the quality of the PNG its extremely blurred.
I've experimented with increased the density but it seems to be making little difference.
It's converting it successfully and the PNG image is the correct size, 4 inches by 6 inches. The problem is the quality of the PNG its extremely blurred.
I've experimented with increased the density but it seems to be making little difference.
using (ImageMagick.MagickImage image = new ImageMagick.MagickImage(label.Label.Data))
{
ImageMagick.Density density = new ImageMagick.Density(400, ImageMagick.DensityUnit.PixelsPerInch);
ImageMagick.MagickGeometry geometry = density.ToGeometry(4, 6);
image.Density = density;
image.Resize(geometry);
// Sets the output format to Png
image.Format = ImageMagick.MagickFormat.Png;
// Create byte array that contains a Png
byte[] data = image.ToByteArray();
}