I am using Magicknet for image manipulation in my ASP.NET project. How can I Get & SET the image resolution of the image? - When I resize a 300 pixel/inch image it apparently by default result in a 72 pixel/inch image, and because I maintain the same size, I get a very low quality image. So I need to be able to maintain the ppi of the image.
I also want to add that this might result in either magicknet or System.Drawing.Image, but I am not 100% sure.
The code that I'm using:
img.ModulusDepth = 10;
img.Compression = CompressionType.JPEGCompression;
img.Quality = 80;
string optimizedImage = System.Web.HttpContext.Current.Server.MapPath(".") + "\\temp\\" + Guid.NewGuid().ToString() + ".jpg";
img.Write(optimizedImage); // save optimized image as temp file
Magick.Term();
System.Drawing.Image tempimage = System.Drawing.Image.FromFile(optimizedImage); // load the optimized image into an image objec
From what I've read here, the default ias 72 pixels per inch.
Thanks