PracticalToolkit.Screenshot 1.0.3

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

Usage

Even after using Using, there will still be a certain amount of time waiting for GC to release the memory usage, GC can be manually called according to the actual situation

  1. Capture Area
using var runner = new ScreenshotRunner();
using var bitmap = runner.Screenshot();

The following is an example of setting the capture area

var isDrawBorder = true;	// Draw the border of the capture area
var isDrawMagnifier = true;	// Draw the magnifier
var opacity = 0.5f;	        // The opacity of the capture area
var borderColor = Color.Red;// The color of the border of the capture area
var options = new RunnerOptions(isDrawBorder, isDrawMagnifier, opacity, borderColor);
using var runner = new ScreenshotRunner(options);
using var bitmap = runner.Screenshot();

  1. Capture All Desktop
using var runner = new ScreenshotRunner();
using var bitmap = runner.ScreenshotAll();
Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8.1

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net7.0-windows7.0

    • No dependencies.
  • net8.0-windows7.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
1.0.3 152 7/26/2024
1.0.2 102 7/25/2024
1.0.1 102 7/24/2024
1.0.0 111 7/24/2024