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

New Post: Feather / anti aliasing / remove jagged lines

$
0
0
I have an emf file with jagged lines:

Image

This is what I am looking:

Image

Here is the code I am using at the minute that uses alot of resources:
            string fileType = "png";

            int densityPercentage = 800;
            int scaleUpBy = 4;
            int resizePercentage = (int)(((double)1 / scaleUpBy) * 100);

            MagickReadSettings settings = new MagickReadSettings();
            settings.Density = new MagickGeometry(new Percentage(densityPercentage * scaleUpBy), new Percentage(densityPercentage * scaleUpBy));
            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.Resize(new Percentage(resizePercentage));

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

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>