VeeFriends.LiveCommerce.Thumbnails 5.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package VeeFriends.LiveCommerce.Thumbnails --version 5.0.6                
NuGet\Install-Package VeeFriends.LiveCommerce.Thumbnails -Version 5.0.6                
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="VeeFriends.LiveCommerce.Thumbnails" Version="5.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VeeFriends.LiveCommerce.Thumbnails --version 5.0.6                
#r "nuget: VeeFriends.LiveCommerce.Thumbnails, 5.0.6"                
#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.
// Install VeeFriends.LiveCommerce.Thumbnails as a Cake Addin
#addin nuget:?package=VeeFriends.LiveCommerce.Thumbnails&version=5.0.6

// Install VeeFriends.LiveCommerce.Thumbnails as a Cake Tool
#tool nuget:?package=VeeFriends.LiveCommerce.Thumbnails&version=5.0.6                

VeeFriends.LiveCommerce.Thumbnails

NuGet Version

A .NET library for generating dynamic thumbnails for VeeFriends LiveCommerce streams, with support for customizable layouts, backgrounds, effects, and host placement.

Features

  • Dynamic Host Placement: Automatically position up to 5 host images with appropriate layout and overlap
  • Layered Composition: Build thumbnails with multiple visual layers (background, effects, logo, hosts, footer)
  • Custom Effects: Apply Photoshop-like blend modes (Screen, Multiply, Overlay, etc.)
  • Flexible Asset Management: Easily access and manage backgrounds, logos, host images, and effects
  • Configurable Output: Save thumbnails with customizable file naming conventions

Installation

dotnet add package VeeFriends.LiveCommerce.Thumbnails

Quick Start

  1. Register the thumbnail generator services in your dependency injection container:
using Microsoft.Extensions.DependencyInjection;
using VeeFriends.LiveCommerce.Thumbnails;

// Add to your service collection
services.AddThumbnailGenerator();
  1. Generate thumbnails with the ThumbnailGenerator:
public class ThumbnailService
{
    private readonly ThumbnailGenerator _thumbnailGenerator;
    
    public ThumbnailService(ThumbnailGenerator thumbnailGenerator)
    {
        _thumbnailGenerator = thumbnailGenerator;
    }
    
    public Stream CreateStreamThumbnail(List<string> hostNames, int backgroundIndex)
    {
        var options = new ThumbnailGenerator.ThumbnailOptions(
            Hosts: hostNames,
            BackgroundIndex: backgroundIndex,
            OutputDirectory: "thumbnails/streams",
            EffectIndex: 2,
            EffectBlendingMode: PixelColorBlendingMode.Screen,
            EffectPlacement: AssetManager.EffectPlacement.Top
        );
        
        return _thumbnailGenerator.GenerateThumbnail(options);
    }
}

Core Components

ThumbnailGenerator

The main entry point for generating thumbnails, combining all the layers into a final image.

AssetManager

Manages and provides access to all visual assets:

  • Backgrounds
  • Effects
  • Host images
  • Logo
  • Footer

HostPlacer

Handles the placement of host images based on the number of hosts (1-5), ensuring proper layout and overlap.

LayerDrawer

Manages the drawing and composition of various layers:

  • Background
  • Effects with blend modes
  • Logo
  • Host overlay
  • Footer

Configuration Options

The ThumbnailOptions record provides configuration for thumbnail generation:

public sealed record ThumbnailOptions(
    List<string> Hosts,                  // Host names to include
    int BackgroundIndex,                 // Background image index
    string OutputDirectory,              // Where to save the output
    int EffectIndex = 1,                 // Effect index to apply
    PixelColorBlendingMode EffectBlendingMode = PixelColorBlendingMode.Screen,  // Blend mode for effect
    AssetManager.EffectPlacement EffectPlacement = AssetManager.EffectPlacement.Top  // Effect placement
)

Example Output

Thumbnails are saved with automatically generated filenames based on hosts, background, and effects:

hosts-gary-vee-snoop-dogg_bg-3_fx-2-screen-top.png

Requirements

  • .NET 6.0 or higher
  • SixLabors.ImageSharp

License

Copyright © VeeFriends

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
5.0.11 0 3/27/2025
5.0.10 0 3/27/2025
5.0.9 0 3/27/2025
5.0.8 0 3/27/2025
5.0.7 0 3/27/2025
5.0.6 68 3/14/2025
5.0.5 71 3/14/2025
5.0.4 70 3/14/2025
5.0.3 121 3/14/2025
5.0.2 125 3/14/2025
5.0.1 120 3/14/2025