Lyo.Screenshot 3.0.0

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

Lyo.Screenshot

Capture a rectangle until stop, then write one PNG, a looping GIF, or one tall receipt image. ScreenGrabber.Create uses GDI on Windows, XGetImage when DISPLAY is set, and grim on Wayland when X is not. ShotSession pulls an IFrameSource until the stop token fires. A GIF encodes each frame as it is captured and returns the first frame as a PNG preview. A grab rectangle that hangs off the screen is clipped to the display. A receipt writes each frame to a temp file under ShotScratch.Directory and drops it before the next frame, then stitches one frame at a time and deletes the file. ShotScratch.Wipe deletes that folder. Screen-edge placement lives in Lyo.Desktop.Components. Stitching matches vertical scroll and appends or prepends only the new rows. Global shortcuts, the clipboard, and the window list live in Lyo.Desktop. The desktop window is lyo-shot in Lyo.Screenshot.App.

Features

  • Still, GIF, receipt. ShotSession.CaptureAsync encodes the first frame, a GIF written one frame at a time, or a stitched PNG. The GIF preview is the first frame as PNG.
  • Scroll stitch. Each frame is written to a temp file and dropped before the next. Stitching reads one frame from that file, then deletes it. Downward motion appends new rows. Upward motion prepends them. Matching stays at the top and bottom of the canvas so a long receipt does not rescan earlier rows. A frame that does not overlap those edges is appended whole. Duplicates add nothing.
  • Grabbers. Windows BitBlt, Linux X11 XGetImage (optional XFixes cursor), and grim when there is no X display. DesktopWindows.List keeps titled windows from Lyo.Desktop and drops lyo-shot.

Examples

Stitch two scrolled frames

using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;

using var first = Image.Load<Rgba32>("frame-0.png");
using var second = Image.Load<Rgba32>("frame-1.png");
using var receipt = ReceiptStitcher.Stitch([first, second]);
var png = await ShotEncoder.EncodePngAsync(receipt);

Capture until stop

using var grabber = ScreenGrabber.Create();
var session = new ShotSession(new GrabFrameSource(grabber));
var shot = await session.CaptureAsync(ShotKind.Receipt, grabber.VirtualScreen, framesPerSecond: 5, includeCursor: false, cancellationToken);
var png = shot.Bytes;

Dependencies

Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).

  • Lyo.Desktop (direct, lyo)
  • Lyo.Exceptions (direct, lyo)
  • SixLabors.ImageSharp 3.1.12 (direct, third-party)
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
3.0.0 46 10/23/2026