Free Trial
10 days, no credit_card

<< More Tutorials

How to resize an image by width in C# using rethumb?

To resize an image or photo in C# use the following code:

using System.IO;
using System;
using System.Net;

class CsRethumbExample
    static void Main()
        string paramOperation = "width";
        int paramValue = 100; // New width in pixels.
        string imageURL = "";
        string imageFilename = "resized-image.jpg";

        using (WebClient client = new WebClient())
            client.DownloadFile(string.Format("{0}/{1}/{2}", paramOperation, paramValue, imageURL), imageFilename);

Start using this example now

Use the following commands to get started:

$ git clone
$ cd rethumb-csharp-examples
$ ... Use your IDE of choice to handle the file "resize-by-width.cs"

More examples using C#