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?
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);
}