supermaker-ai-group-photo 1772.74.349.257

dotnet add package supermaker-ai-group-photo --version 1772.74.349.257
                    
NuGet\Install-Package supermaker-ai-group-photo -Version 1772.74.349.257
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="supermaker-ai-group-photo" Version="1772.74.349.257" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="supermaker-ai-group-photo" Version="1772.74.349.257" />
                    
Directory.Packages.props
<PackageReference Include="supermaker-ai-group-photo" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add supermaker-ai-group-photo --version 1772.74.349.257
                    
#r "nuget: supermaker-ai-group-photo, 1772.74.349.257"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package supermaker-ai-group-photo@1772.74.349.257
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=supermaker-ai-group-photo&version=1772.74.349.257
                    
Install as a Cake Addin
#tool nuget:?package=supermaker-ai-group-photo&version=1772.74.349.257
                    
Install as a Cake Tool

supermaker-ai-group-photo

This package provides a simple and efficient way to programmatically generate AI-powered group photos using the SuperMaker AI service. It streamlines the process of creating visually appealing and professional-looking group photos from a collection of individual images.

Installation

To install the supermaker-ai-group-photo package, use the following command in the .NET CLI: bash dotnet add package supermaker-ai-group-photo

Usage Examples

Here are a few examples demonstrating how to use the supermaker-ai-group-photo package in your C# applications:

Example 1: Basic Group Photo Generation

This example showcases the simplest way to generate a group photo, providing a list of image URLs and specifying the desired output file path. csharp using SuperMaker.AI.GroupPhoto;

public class Example { public static async Task GenerateBasicGroupPhoto() { var imageUrls = new List<string> { "https://example.com/image1.jpg", "https://example.com/image2.png", "https://example.com/image3.jpeg" };

    var outputFilePath = "group_photo.jpg";

    try
    {
        await GroupPhotoGenerator.GenerateGroupPhoto(imageUrls, outputFilePath);
        Console.WriteLine($"Group photo generated successfully at: {outputFilePath}");
    }
    catch (Exception ex)
    {
        Console.WriteLine($"Error generating group photo: {ex.Message}");
    }
}

}

Example 2: Specifying Custom Options

This example demonstrates how to customize the group photo generation process by providing options like background color and image resolution. csharp using SuperMaker.AI.GroupPhoto;

public class Example { public static async Task GenerateCustomGroupPhoto() { var imageUrls = new List<string> { "https://example.com/image1.jpg", "https://example.com/image2.png", "https://example.com/image3.jpeg" };

    var outputFilePath = "custom_group_photo.png";

    var options = new GroupPhotoOptions
    {
        BackgroundColor = "#FFFFFF", // White background
        ImageResolution = "1024x768"  // Example resolution
    };

    try
    {
        await GroupPhotoGenerator.GenerateGroupPhoto(imageUrls, outputFilePath, options);
        Console.WriteLine($"Custom group photo generated successfully at: {outputFilePath}");
    }
    catch (Exception ex)
    {
        Console.WriteLine($"Error generating group photo: {ex.Message}");
    }
}

}

Example 3: Handling API Errors

This example shows how to gracefully handle potential errors returned by the SuperMaker AI service. csharp using SuperMaker.AI.GroupPhoto;

public class Example { public static async Task HandleApiErrors() { var imageUrls = new List<string> { "https://example.com/image1.jpg", "https://example.com/invalid_image.png", // Invalid image URL "https://example.com/image3.jpeg" };

    var outputFilePath = "error_handling_group_photo.jpg";

    try
    {
        await GroupPhotoGenerator.GenerateGroupPhoto(imageUrls, outputFilePath);
        Console.WriteLine($"Group photo generated successfully at: {outputFilePath}");
    }
    catch (GroupPhotoApiException ex)
    {
        Console.WriteLine($"API Error: {ex.Message}");
        Console.WriteLine($"Error Code: {ex.ErrorCode}");
        // Handle the API error appropriately (e.g., retry, log, inform the user)
    }
    catch (Exception ex)
    {
        Console.WriteLine($"General Error: {ex.Message}");
    }
}

}

Example 4: Using a Configuration File

This example demonstrates how to load configuration options from a file, promoting maintainability and flexibility. Assume you have a appsettings.json file with GroupPhotoOptions defined. csharp using SuperMaker.AI.GroupPhoto; using Microsoft.Extensions.Configuration;

public class Example { public static async Task GenerateGroupPhotoFromConfig() { var configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .Build();

    var groupPhotoOptions = configuration.GetSection("GroupPhotoOptions").Get<GroupPhotoOptions>();

    var imageUrls = new List<string>
    {
        "https://example.com/image1.jpg",
        "https://example.com/image2.png",
        "https://example.com/image3.jpeg"
    };

    var outputFilePath = "config_group_photo.jpg";

    try
    {
        await GroupPhotoGenerator.GenerateGroupPhoto(imageUrls, outputFilePath, groupPhotoOptions);
        Console.WriteLine($"Group photo generated successfully at: {outputFilePath}");
    }
    catch (Exception ex)
    {
        Console.WriteLine($"Error generating group photo: {ex.Message}");
    }
}

}

Feature Summary

  • Simplified Group Photo Generation: Easily create group photos from a list of image URLs.
  • Customizable Options: Control background color, image resolution, and other parameters.
  • Error Handling: Robust error handling to manage API errors and other exceptions.
  • Asynchronous Operations: Utilizes asynchronous methods for non-blocking execution.
  • Configuration Support: Easily integrate with configuration systems for flexible settings.

License

This project is licensed under the MIT License - see the LICENSE file for details.

This package is part of the supermaker-ai-group-photo ecosystem. For advanced features and enterprise-grade tools, visit: https://supermaker.ai/image/ai-group-photo/

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1772.74.349.257 131 2/26/2026