OpenSlideSharp.SkiaSharp
4.0.1.3-nightly.20261102.g174630bf.1
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
<PackageReference Include="OpenSlideSharp.SkiaSharp" Version="4.0.1.3-nightly.20261102.g174630bf.1" />
<PackageVersion Include="OpenSlideSharp.SkiaSharp" Version="4.0.1.3-nightly.20261102.g174630bf.1" />
<PackageReference Include="OpenSlideSharp.SkiaSharp" />
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"
#:package OpenSlideSharp.SkiaSharp@4.0.1.3-nightly.20261102.g174630bf.1
#addin nuget:?package=OpenSlideSharp.SkiaSharp&version=4.0.1.3-nightly.20261102.g174630bf.1&prerelease
#tool nuget:?package=OpenSlideSharp.SkiaSharp&version=4.0.1.3-nightly.20261102.g174630bf.1&prerelease
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.
SKColorSpace.CreateIcc, for matrix/TRC profiles. When the result is sRGB itself, the transform leaves the pixels unchanged, andColorMode.Defaultjust drops the profile.- 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
iCCPchunk and decoded again bySKCodecinto sRGB. This tier is an allow-list of what was measured to match LittleCMS. It accepts only an A2B0 tag of typelutAtoBType(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) andlutAtoBTypealike. The result has half the linear light: white 255 → 188, mid gray 128 → 92. - With
lut16and a Lab PCS, it reads the ICC v4 Lab encoding rather than the v2 one thatlut16keeps, up to 7 levels off.
- With an XYZ PCS, it takes 0xFFFF rather than 0x8000 as 1.0, in
- Anything else, including
lut8(mft1), a missing A2B0 tag and a malformed tag table: no conversion, andCreatereturnsnull.
Add the OpenSlideSharp.runtime package for the native OpenSlide library.
| Product | Versions 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. |
-
.NETStandard 2.0
- OpenSlideSharp (>= 4.0.1.3-nightly.20261102.g174630bf.1)
- SkiaSharp (>= 3.119.4)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 3.119.4)
-
.NETStandard 2.1
- OpenSlideSharp (>= 4.0.1.3-nightly.20261102.g174630bf.1)
- SkiaSharp (>= 3.119.4)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 3.119.4)
-
net10.0
- OpenSlideSharp (>= 4.0.1.3-nightly.20261102.g174630bf.1)
- SkiaSharp (>= 3.119.4)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 3.119.4)
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 |