How can I use Magick.Net to resize images?
I need to resize every single image I iterate through, but I don't have very clear how to use this tool.
Here is the code I have so far
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ImageMagick;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
string ruta = @"D:\aleal\Inventa.PazCorp\Inventa.PazCorp.Web.BackOffice\imagenes_cotizador\BannerPrincipal";
string fullMobilePath = @"D:\aleal\Inventa.PazCorp\Inventa.PazCorp.Web.BackOffice\imagenes_cotizador\BannerPrincipal\sm";
if (System.IO.Directory.Exists(ruta))
{
string[] files = System.IO.Directory.GetFiles(ruta);
foreach (string docs in files)
{
string fileName = System.IO.Path.GetFileName(docs);
string destFile = System.IO.Path.Combine(fullMobilePath, fileName);
//Here is where I need to resize the images I get, so then I can copy them into another directory
System.IO.File.Copy(docs, destFile, true);
}
}
}
}
}
I'm trying to get files from an directory, then the goal is to copy each file into another directory but I need to resize them before that
Any idea how to achieve this?