-
Notifications
You must be signed in to change notification settings - Fork 594
Closed
Labels
Description
Description
The version of the native libSkiaSharp library (116.0) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [88.1, 89.0)
Code
Stream GenerateQr(string text)
{
using var generator = new QRCodeGenerator();
// Generate QrCode
var qr = generator.CreateQrCode(text, ECCLevel.L);
// Render to canvas
var info = new SKImageInfo(512, 512);
using var surface = SKSurface.Create(info);
var canvas = surface.Canvas;
canvas.Render(qr, info.Width, info.Height);
// Output to Stream -> File
using var image = surface.Snapshot();
using var data = image.Encode(SKEncodedImageFormat.Png, 100);
var img = SKImage.FromPixels(image.PeekPixels());
// encode the image (defaults to PNG)
var encoded = image.Encode();
// get a stream over the encoded data
return encoded.AsStream();
}
Expected Behavior
WORKING VERSION 2.88.9
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.9" />
Actual Behavior
No response
Version of SkiaSharp
3.116.0 (Current)
Last Known Good Version of SkiaSharp
2.88.9 (Previous)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Linux
Platform / Operating System Version
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
Devices
No response
Relevant Screenshots
No response
Relevant Log Output
System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception.
---> System.InvalidOperationException: The version of the native libSkiaSharp library (116.0) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [88.1, 89.0).
at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Version minSupported, Version current, Boolean throwIfIncompatible)
at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
at SkiaSharp.SKObject..cctor()
--- End of inner exception stack trace ---
at SkiaSharp.SKObject..ctor(IntPtr handle, Boolean owns)
at SkiaSharp.SKSurface..ctor(IntPtr h, Boolean owns)
at SkiaSharp.SKSurface.GetObject(IntPtr handle)
at SkiaSharp.SKSurface.Create(SKImageInfo info, Int32 rowBytes, SKSurfaceProperties props)
at SkiaSharp.SKSurface.Create(SKImageInfo info)
Code of Conduct
- I agree to follow this project's Code of Conduct
slackerbob and RajeevRameshHNR
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done