X-Ray.PS.Skia 26.10.7077

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

X-Ray.PS.Skia

X-Ray

An optional SkiaSharp raster writer for X-Ray.PS, part of the X-Ray family of .NET document libraries.

X-Ray.PS renders PostScript, EPS and XPS pages to PNG, JPEG, TIFF and BMP with a pure managed rasterizer. This package adds SkiaRasterWriter, which draws the same render model with Skia: anti-aliased paths and clips, hinted glyph rasterization from the resolved TrueType fonts, image and gradient shaders, and opacity layers. Its output matches the default (Skia based) raster output of the MIT-licensed Python library X-Ray.PS was ported from.

The core package has no native dependencies; this one brings in SkiaSharp and its native library.

Install

dotnet add package X-Ray.PS.Skia

On Linux, also reference a SkiaSharp native asset package, for example SkiaSharp.NativeAssets.Linux.NoDependencies.

Usage

using XRay.PS;
using XRay.PS.PostScript;
using XRay.PS.Skia;
using XRay.PS.Xps;

var options = new ImageSaveOptions(ImageFormat.Png, dpi: 150) { RasterWriter = new SkiaRasterWriter() };

byte[] png = PsDocument.FromFile("input.ps").ToImage(options);

var xps = XpsDocument.FromFile("input.xps");
List<byte[]> pages = xps.ToImages(options);

// XPS opacity masks are rasterized while building the PDF; Skia can do that too.
byte[] pdf = xps.ToPdf(new PdfSaveOptions { MaskRasterizer = new SkiaRasterWriter() });

PNG and JPEG are drawn with Skia. TIFF and BMP output, and documents whose images Skia cannot take safely (1-pixel images, CCITT data, samples other than 8 bits, full-page soft masks), fall back to the managed RenderModelRasterWriter. A writer instance keeps no state between calls and can be shared.

License

MIT. See LICENSE in the package.

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 (1)

Showing the top 1 NuGet packages that depend on X-Ray.PS.Skia:

Package Downloads
X-Ray

The umbrella package for the X-Ray family of .NET libraries. Carries no code of its own: installing it brings in every X-Ray package, for content extraction (X-Ray.Content), rendering office documents to PDF and images (X-Ray.Office), and reading Photoshop (X-Ray.Psd), email (X-Ray.Email), iCalendar (X-Ray.Ics), PostScript and XPS (X-Ray.PS) and OneNote (X-Ray.OneNote) files. Install a single member directly if you only need one.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
26.10.7077 43 10/21/2026
26.10.7057 61 10/20/2026
26.10.7019 75 10/19/2026
26.10.6966 72 10/19/2026
26.10.6963 56 10/19/2026