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

New Post: Generic Resize Settings

$
0
0
Hi,

I need a universal resize method that can handle any supported image type.

The resize will always be a down sizing.

I've already noticed that its important to set the the "Density" when loading the image. I've set this at 150

I will be saving JPG.

What else do I need to add to handle PNG transparency etc so that it appears as if it was printed on a white sheet of paper?
var settings = new MagickReadSettings {Density = new PointD(150)};

                using (var image = new MagickImage(_mediaFolder + "/" + upload.FileName, settings)) {
                    image.Resize(1024, 1024);
                    image.Format = MagickFormat.Jpg;
                    filePath = ....
                    image.Write(filePath);
                }

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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