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

New Post: Increase DPI from 72 to 300 does not work

$
0
0
Sorry, I never received a notice that you replied.
Attached is my image.
TEXT

I tried the following code changes. STILL no luck.
            using (MagickImage resize = new MagickImage(folder + filename))
            {
                Single DPIChangeRatio = Convert.ToSingle(density) / Convert.ToSingle(res.X);
                resize.VirtualPixelMethod = VirtualPixelMethod.Transparent;
                resize.Resize(Convert.ToInt32(Convert.ToSingle(resize.Width) * DPIChangeRatio), Convert.ToInt32(Convert.ToSingle(resize.Height) * DPIChangeRatio));
                resize.Resample(density, density);
                resize.Density = new Density(density, density, DensityUnit.PixelsPerInch);

                filename = Guid.NewGuid().ToString() + System.IO.Path.GetExtension(filename);
                resize.Write(folder + filename);
            }

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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