Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Feather / anti aliasing / remove jagged lines

$
0
0
The settings.Density property does not support percentages. You are reading the image at 1200 DPI. You probably don't need a value that high. I think you should rewrite your code to something like this:
string fileType = "png";

int inputDensity = new MagickGeometry(300);
int outputDensity = new MagickGeometry(72);

MagickReadSettings settings = new MagickReadSettings();
settings.Density = inputDensity;
settings.ColorSpace = ColorSpace.RGB;
using (MagickImage image = new MagickImage())
{
    // Add all the pages of the pdf? file to the collection
    image.Read(@"C:\Users\User\Desktop\8060.emf", settings);
    image.Format = (MagickFormat)Enum.Parse(typeof(MagickFormat), fileType, true);
    image.BackgroundColor = new MagickColor(255, 255, 255);

    image.Resample(outputDensity);

    image.Write(@"C:\Users\Cathal Colgan\Desktop\test1." + fileType);
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles