ImageMagick MagickNet C# WebApplication We can also use the ImageMagick image resizing function like
It will resize the image depending on the aspect ratio
System.Diagnostics.Process process1;
process1 = new System.Diagnostics.Process();
process1.EnableRaisingEvents = false;
string strCmdLine;
strCmdLine = "/C convert " + file + fileName + " -resize " + 100+ "x" + 100+ " " + ConfigurationManager.AppSettings["ImgPath"] + fileName;
process1.StartInfo.FileName="CMD";
process1.StartInfo.Arguments=strCmdLine;
process1.Start();
if (!process1.HasExited)
{
process1.WaitForExit();
} |