Some reproduce code:
Code: Select all
string lvFile = @"C:\Temp\test.png";
using (MagickImage lvImage = new MagickImage(new MagickColor(Color.Black), 2550, 3300))
{
lvImage.Settings.Format = MagickFormat.Png;
lvImage.Settings.Compression = Compression.Group4;
lvImage.Settings.Density = new Density(300, 300, DensityUnit.PixelsPerInch);
lvImage.Settings.Debug = true;
lvImage.Settings.Verbose = true;
lvImage.Density = new Density(300, 300, DensityUnit.PixelsPerInch);
lvImage.Write(lvFile);
}
using (MagickImage lvWrittenImage = new MagickImage(lvFile))
{
Trace.WriteLine(lvWrittenImage.Density); // Outputs 118.11x118.11 cm
}
Thanks