Shutter 1.0.0

dotnet add package Shutter --version 1.0.0
                    
NuGet\Install-Package Shutter -Version 1.0.0
                    
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="Shutter" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Shutter" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Shutter" />
                    
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 Shutter --version 1.0.0
                    
#r "nuget: Shutter, 1.0.0"
                    
#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 Shutter@1.0.0
                    
#: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=Shutter&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Shutter&version=1.0.0
                    
Install as a Cake Tool

Shutter

A cross-platform screenshot library for .NET that supports Windows, macOS, and Linux (X11/Wayland).

Features

  • Cross-platform support with native API calls
  • Multiple capture targets: full screen, window, display, or region
  • PNG and JPEG output formats
  • No external dependencies beyond ImageSharp for image encoding
  • Dependency injection friendly
  • Configurable fallback behavior for unsupported features

Installation

dotnet add package Shutter

Quick Start

using Shutter;

// Capture entire screen
ScreenshotService screenshot = new();
byte[] imageData = screenshot.TakeScreenshot();
File.WriteAllBytes("screenshot.png", imageData);

Advanced Usage

using Shutter;
using Shutter.Models;
using Shutter.Enums;

ScreenshotService screenshot = new();

// Capture a specific window
ScreenshotOptions options = new()
{
    Target = CaptureTarget.Window,
    WindowHandle = process.MainWindowHandle,
    IncludeBorder = true,
    IncludeShadow = false,
    Format = ImageFormat.Jpeg,
    JpegQuality = 85
};

byte[] imageData = screenshot.TakeScreenshot(options);

Platform Support

Feature Windows macOS Linux/X11 Linux/Wayland
Full Screen
Window Capture
Display Selection
Region Capture
Interactive Mode
Border Control
Shadow Control

Examples

Capture Specific Display

ScreenshotOptions options = new()
{
    Target = CaptureTarget.Display,
    DisplayIndex = 1  // Zero-based index
};
byte[] imageData = screenshot.TakeScreenshot(options);

Capture Screen Region

ScreenshotOptions options = new()
{
    Target = CaptureTarget.Region,
    Region = new Rectangle { X = 100, Y = 100, Width = 800, Height = 600 }
};
byte[] imageData = screenshot.TakeScreenshot(options);

Wayland Interactive Mode

ScreenshotOptions options = new()
{
    Interactive = true,
    Timeout = TimeSpan.FromSeconds(30)
};
byte[] imageData = screenshot.TakeScreenshot(options);

Fallback Behavior

Configure how the library handles unsupported features:

ScreenshotOptions options = new()
{
    Target = CaptureTarget.Window,
    WindowHandle = handle,
    Fallback = FallbackBehavior.ThrowException  // Throws if feature unsupported
};

Available fallback behaviors:

  • ThrowException - Throws PlatformNotSupportedException for unsupported features
  • Default - Falls back to full screen capture
  • BestEffort - Attempts the closest available alternative

Dependency Injection

services.AddSingleton<IScreenshotService, ScreenshotService>();

Requirements

  • .NET 8.0 or higher
  • Windows: Windows 7 or higher
  • macOS: macOS 10.12 or higher (uses CoreGraphics framework)
  • Linux: X11 or Wayland session with appropriate libraries
    • X11: libX11 installed
    • Wayland: DBus and XDG Desktop Portal support

Implementation Details

Shutter uses platform-specific native APIs:

  • Windows: Win32 GDI and User32 APIs
  • macOS: CoreGraphics framework (CGDisplayCreateImage)
  • Linux/X11: libX11 (XGetImage)
  • Linux/Wayland: DBus communication with XDG Desktop Portal

Known Limitations

  • Window capture is not supported on macOS (cannot obtain window IDs from .NET Process)
  • Wayland only supports full screen capture or interactive selection due to security model
  • Interactive mode is only available on Wayland
  • Border and shadow control only available on Windows
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.

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
1.0.0 133 9/3/2025
1.0.0-beta-1 58 8/23/2025