Zaya.Screenshot.Impl.Windows 2.0.0

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

Zaya.Screenshot

High-performance screen capture for Windows .NET 8.0+ — Windows Graphics Capture + Direct3D 11, with IRawImage / ReadOnlySpan<byte> pixel access and configurable output formats.

Packages

Package Version Role
Zaya.Screenshot 2.0.0 Abstractions: ICaptureService, ICaptureSession, region types, PixelFormatExtensions
Zaya.Screenshot.Impl.Windows 2.0.0.0 Windows Graphics Capture + D3D11 (CaptureService, CapturedFrame)

Requires Zaya.Primitives 2.0.0.

Update channel (GitHub Releases): plugin-Zaya.Screenshot-v2.0-latest

See versioning.

Docs: API & articles

Features

  • Capture full desktops, individual windows, or rectangular sub-regions (FullScreenDesktopRegion, FullScreenWindowRegion, RectDesktopRegion, RectWindowRegion)
  • Pixel formats: BGRA32, RGB24, BGR24, Gray8
  • High-performance ReadOnlySpan<byte> access via IRawImage
  • Engine metadata (EngineId, localized name/description, Settings) for plugin hosts
  • Windows engine failures surface as LocalizedException for host UI
  • UI/error strings for the Windows engine: en, ru, zh-Hans, uk, de, pt, ja, ko, fr, tr, pl
  • Optional helpers mapping PixelFormat to SkiaSharp / ImageSharp type names

There is no separate InitializeAsync / pause-resume API: create a session and call CaptureAsync.

Platform

  • Windows 10 version 19041 (20H1) or later
  • Direct3D 11 compatible GPU with BGRA support

Installation

<PackageReference Include="Zaya.Screenshot" Version="2.0.0" />
<PackageReference Include="Zaya.Screenshot.Impl.Windows" Version="2.0.0.0" />

Plugin zip for ScreenTranslator hosts: Zaya.Screenshot.Impl.Windows.zip from the floating tag above.

Quick Start

using System.Globalization;
using Zaya.Screenshot.Impl.Windows;
using Zaya.Screenshot.Models;

using var service = new CaptureService();

Console.WriteLine(service.DisplayName.GetValue(CultureInfo.CurrentUICulture));
Console.WriteLine(service.IsAvailable);

// Capture entire primary monitor
var region = new FullScreenDesktopRegion();
using var session = await service.CreateSessionAsync(region);
using var frame = await session.CaptureAsync();

if (frame is null)
    return;

var pixelData = frame.GetPixelData();
Console.WriteLine($"Captured {frame.Width}x{frame.Height}, format: {frame.Format.Name}");

byte[] copy = frame.ToByteArray();

Capture a Window

var region = new FullScreenWindowRegion { WindowHandle = hwnd };
using var session = await service.CreateSessionAsync(region);

Capture a Rectangular Sub-Region

var region = new RectDesktopRegion
{
    DisplayIndex = 0,
    // Coordinates relative to the top-left of that display (not the virtual desktop)
    Rectangle = new Rectangle(100, 100, 400, 300)
};

Select Pixel Format

var region = new FullScreenDesktopRegion
{
    PixelFormat = PixelFormat.Gray8 // 1 byte per pixel, useful for OCR
};

Architecture

Resolve ICaptureService (new / DI / plugin host)
  → Read DisplayName / Description / Settings / IsAvailable
  → CreateSessionAsync(region[, settings])
  → CaptureAsync() → IRawImage
  → Dispose session / service
  • Zaya.Screenshot — interfaces and region models
  • Zaya.Screenshot.Impl.Windows — Windows Graphics Capture + Direct3D 11

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows10.0.19041 is compatible.  net9.0-windows 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
2.0.0 47 8/19/2026
1.3.0 91 8/14/2026
1.2.0 92 8/9/2026
1.1.0 90 8/7/2026
1.0.0.4 101 8/3/2026
1.0.0.3 97 8/3/2026
1.0.0.2 102 8/2/2026
1.0.0.1 103 8/1/2026
1.0.0 100 7/30/2026
0.4.0 96 7/29/2026
0.3.1 99 7/27/2026