Dotnet

Dotnet library for performing different image operations.

using System;
using System.Collections.Specialized;
using System.Web;

class GumletURLBuilder
{
    static void Main()
    {
        UriBuilder uriBuilder = new UriBuilder("https://demo.gumlet.io/flower.jpeg");
        
        // Create a collection to hold query parameters
        var query = HttpUtility.ParseQueryString(uriBuilder.Query);
        
        // Add query parameters
        query["width"] = "250";
        query["dpr"] = "1.0";
        query["overlay"] = "https://demo.gumlet.io/logo.png";
        
        // Assign the query string to the UriBuilder
        uriBuilder.Query = query.ToString();

        // Get the final URL
        Uri finalUri = uriBuilder.Uri;
        string finalUrl = finalUri.ToString();

        // Output the final URL
        Console.WriteLine(finalUrl);  // Output: https://demo.gumlet.io/flower.jpeg?width=250&dpr=1.0&overlay=https:%2f%2fdemo.gumlet.io%2flogo.png
    }
}