OpenSlideSharp.SkiaSharp 4.0.1.3-nightly.20261102.g174630bf.1

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

OpenSlideSharp.SkiaSharp

SkiaSharp integration for OpenSlideSharp: JPEG and PNG encoding of PixelImage, and ICC to sRGB color conversion.

using OpenSlideSharp;
using OpenSlideSharp.SkiaSharp;

using var slide = OpenSlide.Open("slide.svs");
byte[] png = slide.ReadRegion(0, 0, 0, 512, 512).Encode(ImageFormat.Png);
byte[] jpeg = slide.ReadRegion(0, 0, 0, 512, 512).Encode(ImageFormat.Jpeg, quality: 85, colorMode: ColorMode.Embed);

Color modes

ColorMode Pixels Output ICC
Default converted to sRGB; if the profile cannot be converted, behaves like Embed (a profile too large for a JPEG is then dropped) none (embedded when the profile cannot be converted)
Embed unchanged the image's profile
Ignore unchanged none

An image without an ICC profile is encoded the same way in all three modes. Embed throws ArgumentException for a JPEG when the profile is larger than the 255 × 65519 bytes a JPEG can hold.

Conversion tiers

SkiaColorTransform.Create(icc) returns an IColorTransform that you can pass to DeepZoomGenerator and OmeZarrOptions, or null when the profile is not converted (the pixels are then left as they are). Only RGB profiles are considered: the data must hold a full 128-byte header with the data color space RGB . Gray, CMYK and other profiles are not converted, since Skia would apply them wrongly or not at all.

  1. SKColorSpace.CreateIcc, for matrix/TRC profiles. When the result is sRGB itself, the transform leaves the pixels unchanged, and ColorMode.Default just drops the profile.
  2. Lookup-table profiles that Skia parses but cannot turn into a color space: the pixels are encoded as an uncompressed PNG with the profile in an iCCP chunk and decoded again by SKCodec into sRGB. This tier is an allow-list of what was measured to match LittleCMS. It accepts only an A2B0 tag of type lutAtoBType (mAB ) in a profile with a Lab PCS, which came within 1 level. skcms, which does the decoding, misreads the other cases:
    • With an XYZ PCS, it takes 0xFFFF rather than 0x8000 as 1.0, in lut16 (mft2) and lutAtoBType alike. The result has half the linear light: white 255 → 188, mid gray 128 → 92.
    • With lut16 and a Lab PCS, it reads the ICC v4 Lab encoding rather than the v2 one that lut16 keeps, up to 7 levels off.
  3. Anything else, including lut8 (mft1), a missing A2B0 tag and a malformed tag table: no conversion, and Create returns null.

Add the OpenSlideSharp.runtime package for the native OpenSlide library.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 OpenSlideSharp.SkiaSharp:

Package Downloads
OpenSlideSharp.AspNetCore

ASP.NET Core endpoints serving OpenSlide slides as Deep Zoom and OME-Zarr, with a slide cache.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.1.3-nightly.20261102... 0 11/19/2026
4.0.1.3-nightly.20261102... 44 11/19/2026